-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Avoid dropdown closing #731
Comments
I've been digging around through the issues and cannot figure out how to do the same. Stumbled across issue #646, which seems to be the most recent attempt at someone trying to do this. Couldn't get any results from it for me, but you may have more luck than me! |
I'm not very good with this kind of things. However, I think that the problem is only here: I have to "empty" the close method of dropdown. Where can i access to it in the new code? I saw that |
you could do a |
@Mutmatt,I've just tried what you've suggested and I couldn't get it to stop the dropdown closing. I added console.log to the function to see if it was being hit and it wasn't.. I've searched all over github and the web looking for how to do this in 0.10.x but cannot find anything that is up to date. |
I don't recommend this as this is very likely to break in the future since you're messing around with the internals of typeahead.js, but if you change |
Thanks a lot, Jake
|
should there be an option to prevent the dropdown from closing? |
@jstejada so behavior are you looking to achieve? You want the menu to always be open? |
@jharding exactly! I want to be able to select multiple options, so I need to be able to select without closing the dropdown menu. thanks! |
Seconded. I'd like to support clicking an element to show more data about a row but the default behavior is to select the clicked row and close out the dropdown. |
Well putting a click handler in and stopping the propagation works too, so I don't know if it's necessary to mod the library. |
@worleydl What did you hook the click handler up to? I am trying to do the same thing on the suggestion, the menu, and the dataset, but stopPropogation() is not working for me. Thank you! |
@jdrorrer I'm using an tag for my row template. Setting up a click handler at that level and stopping propagation prevents the dropdown from being closed. |
@worleydl For whatever reason, I couldn't get that to work. However, this did the trick for me: |
How to accomplish it with the new version? Before 0.10 I did:
But now it doesn't work.
Thanks fot the replies
The text was updated successfully, but these errors were encountered: