[Snyk] Upgrade @headlessui/react from 1.4.2 to 1.6.1 #157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @headlessui/react from 1.4.2 to 1.6.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: @headlessui/react
Fixed
attrsforCombobox,ListboxandTabsGroupcomponent (#1372)Fixed
Comboboxinitially (#1148)Dialogusage inTabcomponent (#1149)PopoverPanelcomponents (#1153)hoverscroll issue inListbox,ComboboxandMenucomponents (#1161)Listbox,ComboboxandMenuactions (#1168)ComboboxInputwhen the value gets reset (#1181)item/optionindex onListbox,ComboboxandMenucomponents (#1184)Dialogcycling (#553)Tabon mouseup (#1192)focus()fromListbox.Option(#1218)ownerDocumentinstead ofdocument(#1158)elfrom each component (#1230)TabandDialogcomponents (#1231)ComboboxInputvalue (#1248)PopoverButton(#1263)Dialogcomponent (#1268)Tab(#1272)initialFocusRefcorrectly (#1276)Combobox(#1279, #1281)RadioGroup,SwitchandComboboxcomponents (#1285)nullableprop for Vue (2b109548b1a94a30858cf58c8f525554a1c12cbb)openprop over OpenClosed state (#1360)Added
ListboxandComboboxcomponents (#1243, #1355)Combobox(#1295)DialogPanelto resolve issues when scrolling long dialogs that useDialogOverlay(#1333)Changes that might affect you
Migrating from
DialogOverlaytoDialogPanelIn previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the
DialogOverlaycomponent, so as long as your overlay was rendered behind your panel, clicking outside the panel would close the dialog.This created an issue with scrollable dialogs, because it became easy to accidentally position your overlay on top of the scrollbar, which made it impossible to click the scrollbar without closing the dialog. You also couldn't scroll the dialog when your mouse was hovering over the overlay — only when your mouse was hovering over the actual panel.
We've fixed this in Headless UI v1.6 by adding a dedicated
DialogPanelcomponent, and changing how "click outside" is handled. Now, if you're using aDialogPanel, the dialog is closed any time you click any element outside of it, rather than closing only when aDialogOverlayis explicitly clicked.If you're using
DialogOverlayand not usingDialogPanel, everything will continue to work exactly as it did before (including the bug I described above) to preserve backwards compatibility, but we highly encourage you to migrate to usingDialogPanel, and to stop usingDialogOverlay, instead using a simpledivelement:+ <div class="fixed inset-0 bg-black/25" />
- <div class="bg-white shadow-xl rounded-2xl ...">
+ <DialogPanel class="bg-white shadow-xl rounded-2xl ...">
<DialogTitle>Payment successful</DialogTitle>
<!-- ... -->
- </div>
+ </DialogPanel>
</Dialog>
Read through the updated Dialog documentation for more examples of using
DialogPanel.Multiple value support for
ListboxandComboboxIf you have been using the insiders build for the new multiple value support for the
Listboxand/orComboboxcomponent, then you will have to add a newmultipleprop to those components to tell the component that you are using multiple values. Previously this was automatically detected based on whether you were passing an array to thevalueprop or not.Commit messages
Package name: @headlessui/react
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs