Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure correct order when conditionally rendering Menu.Item, Listbox.Option and RadioGroup.Option #1045

Merged
merged 9 commits into from
Jan 18, 2022

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Jan 17, 2022

This PR will ensure that the order of Menu.Item, Listbox.Option and RadioGroup.Option is correct even if you re-rendered some items conditionally essentially re-ordering them.

This is both applied to the React and Vue versions.

Fixes: #994

@vercel
Copy link

vercel bot commented Jan 17, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/@headlessui-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/HvcgQJvLGg92e8qLXTZXh7jmrPtm
✅ Preview: https://headlessui-react-git-ensure-consistent-order-tailwindlabs.vercel.app

headlessui-vue – ./packages/@headlessui-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/6MKNuTXU9MwtQkbbUCLA6ujr2vgi
✅ Preview: https://headlessui-vue-git-ensure-consistent-order-tailwindlabs.vercel.app

@cabello
Copy link

cabello commented Mar 10, 2022

I am seeing an out of order navigation on Combobox, would a similar fix help there as well?

@RobinMalfait
Copy link
Member Author

@cabello this should already be implemented, but make sure to use the insiders build for now:

You can already try it using:

  • npm install @headlessui/react@insiders or yarn add @headlessui/react@insiders.
  • npm install @headlessui/vue@insiders or yarn add @headlessui/vue@insiders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Menu component with dynamic content skips through items when using arrows
3 participants