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 am showing suggestion in event on('typeahead:render') inline and I close suggestions menu using $(this).typeahead('close'); like so:
.on('typeahead:render', function (ev, suggestion) {
$(this).typeahead('close');
// Other code to display suggestions inline after input
})
I am using this way because I was not able to do so using templates. All works fine apart when user focus outside input and then focus again input, then appear suggestions menu.
.on('typeahead:focused', function (ev, suggestion) {
$(this).typeahead('close');
})
I try also with this but don't works:
.on('typeahead:active', function (e) {
$(this).typeahead('close');
})
.on('typeahead:change', function (e) {
$(this).typeahead('close');
})
active event is fired when user focus input but menu is not closed, seem that is fired before menu open.
Not a big problem but would be good if I can hide always. But maybe there is another way.
I want to archive this because suggestions is just one, I use it to suggest username if is already taken. So I just display the first username found available attaching incremental number.
Thanks
The text was updated successfully, but these errors were encountered:
I am showing suggestion in event
on('typeahead:render')
inline and I close suggestions menu using$(this).typeahead('close');
like so:I am using this way because I was not able to do so using templates. All works fine apart when user focus outside input and then focus again input, then appear suggestions menu.
I can't find an event on typeahead:focused, I see there is here https://github.com/corejavascript/typeahead.js/blob/master/dist/typeahead.bundle.js#L1472 but doesn't work if I try:
I try also with this but don't works:
active event is fired when user focus input but menu is not closed, seem that is fired before menu open.
Not a big problem but would be good if I can hide always. But maybe there is another way.
I want to archive this because suggestions is just one, I use it to suggest username if is already taken. So I just display the first username found available attaching incremental number.
Thanks
The text was updated successfully, but these errors were encountered: