Skip to content
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

Issue with getActive and change event #404

Open
thekrotek opened this issue Nov 29, 2022 · 0 comments
Open

Issue with getActive and change event #404

thekrotek opened this issue Nov 29, 2022 · 0 comments

Comments

@thekrotek
Copy link

I've found a weird issue with "getActive" call when it always returns the 1st match. I added this call according to the documentation, to the "change" event. Problem is that for me change happened earlier than "active" value update here:

this.$element.data('active', val);

I solved this by triggering a custom event:

afterSelect: function(data) { $("input[name='search']").trigger("selected"); },

And then checking it the usual way:

$("input[name='search']").on("selected", function() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant