svelte-headlessui
svelte-headlessui copied to clipboard
User specified `id` on combobox list item causes infinite loop
Hi, loving the concept and implementation of this library, being able to bring your own HTML and then adding actions to get the required functionality feels like a real solution for headless UI logic finally. Thank you!
I encountered an infinite state update loop due to an id being set on the combobox list item. Here's what I mean https://github.com/codewithcheese/svelte-headlessui/commit/d7ff662392875d6911eed524dd7d476cc79673f6
I was copying some HTML from tailwindui which had ids set. I see this breaks how the library uses ids internally, and I now know to remove them.
This was hard to debug and not a pleasant DX. If the goal is for users to bring actions to their own HTML then this could be a common pitfall. Not sure of the solution, maybe even just a warning would help
It would probably make sense to just keep any existing ID if there was one.