Closed Lakhiii closed 5 years ago
@Lakhiii had the same issue, make sure you are using plain javascript for this to work otherwise the trigger even isn't working properly.
$('.tag.label').on("click", function() { var tag = $(this); var search = tag.data("search"); var searchBox = document.getElementById('search-site-names'); searchBox.value = search; searchBox.dispatchEvent(new KeyboardEvent('keyup',{'key':'a'})); });
@grovolis it worked!! thanks very much for the solution really helped a lot!
I am trying to feed a value to the input using Jquery.val() but the input filter does not trigger the Jplist refresh/update. After adding a space in that input filter triggers the Jplist refresh.
Tried adding the Jquery.trigger("keypress") to simulate the user key press but it still does not trigger the Jplist refresh. Does JPList has a way to refresh the list similar to data-clear-btn-id which clears the filters?