svelte-headlessui
svelte-headlessui copied to clipboard
Feature request: dispatch event according actions for easier integration with other libraries
Right now this lib does not dispatch any event, which makes integrating with other libraries difficult. For example, if I am using Dialog action, it would be great if an close event will be dispatched when dialog.close is called, so that I can do something custom after that dialog is closed(For example toggle a boolean in local storage so that user will not see that dialog again)
Is that something you would consider in this library? I can help with PR but want to know your thought first
@CaptainCodeman Do you have any thought on this? Right now I can see Grail UI is offering an event handler, and it would be great this library of this as well, (and even better we emit the event through native API, so user can consume the event with on:custom_event where ever they want)
Yes, I think some events would make sense. The main ones I can think of will be things opening / closing and selections changing.