tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
https://headlessui.com
MIT License
25.81k stars 1.07k forks source link

Fix `Combobox` `virtual` mode types for `multiple` #3392

Closed kradical closed 2 months ago

kradical commented 2 months ago

Fixes: https://github.com/tailwindlabs/headlessui/issues/3391

When multiple is specified we expect TValue to already be an array, so lets just ensure its an array and use it as the type for virtual.options. Similarly the disabled callback gets passed a TValue, but when multiple is true it is passed something of type element of TValue.

Behaviour in javascript lines up with this fine, just a type level fix afaik.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
headlessui-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 9:11pm
headlessui-vue ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 9:11pm
thecrypticace commented 2 months ago

Ah whoops — thanks for fixing!

This will be available in our next release but you can try it before then via our insiders build (should be published in the next few minutes if not already):

npm install @headlessui/react@insiders
kradical commented 2 months ago

no problem, thanks for the quick turnaround! awesome, ty

mralexfed007 commented 1 month ago

Hello, do you know when these changes will be released ?