Open thekrotek opened 1 year ago
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() {
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() {