[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
attrs
forCombobox
,Listbox
andTabsGroup
component (#1372)Fixed
Combobox
initially (#1148)Dialog
usage inTab
component (#1149)PopoverPanel
components (#1153)hover
scroll issue inListbox
,Combobox
andMenu
components (#1161)Listbox
,Combobox
andMenu
actions (#1168)ComboboxInput
when the value gets reset (#1181)item
/option
index onListbox
,Combobox
andMenu
components (#1184)Dialog
cycling (#553)Tab
on mouseup (#1192)focus()
fromListbox.Option
(#1218)ownerDocument
instead ofdocument
(#1158)el
from each component (#1230)Tab
andDialog
components (#1231)ComboboxInput
value (#1248)PopoverButton
(#1263)Dialog
component (#1268)Tab
(#1272)initialFocusRef
correctly (#1276)Combobox
(#1279, #1281)RadioGroup
,Switch
andCombobox
components (#1285)nullable
prop for Vue (2b109548b1a94a30858cf58c8f525554a1c12cbb)open
prop over OpenClosed state (#1360)Added
Listbox
andCombobox
components (#1243, #1355)Combobox
(#1295)DialogPanel
to resolve issues when scrolling long dialogs that useDialogOverlay
(#1333)Changes that might affect you
Migrating from
DialogOverlay
toDialogPanel
In previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the
DialogOverlay
component, 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
DialogPanel
component, 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 aDialogOverlay
is explicitly clicked.If you're using
DialogOverlay
and 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 simplediv
element:+ <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
Listbox
andCombobox
If you have been using the insiders build for the new multiple value support for the
Listbox
and/orCombobox
component, then you will have to add a newmultiple
prop 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 thevalue
prop 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