You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've changed the dropdown example and added an event. In this case I double click to open the dropdown, so far so good. When I click outside nothing happends because I need to double click outside to make it hide again.
In my case I want to double click to open and single click to hide. Is that possible or do I need to roll out an own solution? Or a hook for it?
<divclass="example-dropdown"><buttontype="button"
class="example-dropdown-button"
data-toggle-class="is-open"
data-toggle-target-nextdata-toggle-event="dblclick"
data-toggle-outsidedata-toggle-escape>
Select something here
</button><ulclass="example-dropdown-list"><li><buttontype="button">Lorem ipsum dolor</button></li><!-- Several options --></ul></div>
Feature
A possible feature would be data-toggle-outside-event to specify a special event for outside clicks.
Hack it
For anyone else having this issue, it's possible to fix it by hacking the code like this:
I assumed the event would be always the same to toggle on and off, but I see with you case study that it not true. So yes, I think a new attribute data-toggle-outside-event would be great for you.
I've changed the dropdown example and added an event. In this case I double click to open the dropdown, so far so good. When I click outside nothing happends because I need to double click outside to make it hide again.
In my case I want to double click to open and single click to hide. Is that possible or do I need to roll out an own solution? Or a hook for it?
https://twikito.github.io/easy-toggle-state/#dropdown
Feature
A possible feature would be
data-toggle-outside-event
to specify a special event for outside clicks.Hack it
For anyone else having this issue, it's possible to fix it by hacking the code like this:
Go here:
https://github.com/Twikito/easy-toggle-state/blob/master/dist/easy-toggle-state.es6.js#L188
Change it to:
The text was updated successfully, but these errors were encountered: