Easy peasy question:
This is the classic template of searchbar:
var searchbar = $f7.searchbar.create({
el: '.searchbar',
searchContainer: '.list',
searchIn: '.item-title',
on: {
run_my_search(query)
}
}
});
I would like to know if there is the possibility to delay the on
event like this (this is my old code of other project):
$('input[name="search"]').keyup(delay(async function (e) {
let query = $$('input[name="search"]').val()
run_my_search(query_restaurant_name)
}, 500));
The main idea is not to launch a search at each typing, but to leave the time to type at least a few characters to the user (to save resources and server-side rest calls).
I didn’t find anything in the doc