TW-Elements
TW-Elements copied to clipboard
Select - Alpine
I have a button with alpine that opens a popup filter with select fields. On alpine popup i have a x-on:click.outside to hide popup.
My problem is that when i click on select my popup closes. How can i fix this?
Thanks!
Hi, is the popup one of our components? Most likely the click.outside
method is treating the select component as a click outside (element other than the popup). If you have access to that method you can check wheter clicked element is the select TWE component and if it is, then return the function before the rest of the code runs.
If it's not the issue, and something on the TWE is not working correctly, please provide some kind of code co we can whats going on.
You can create snippets here (umd): https://tw-elements.com/snippets/