vue-use-route-query
vue-use-route-query copied to clipboard
Debounce option?
Hi there,
Many thanks for this great package, works well!
I tried to debounce the fromQuery or toQuery function to prevent some issues when typing too fast in a search input for instance (some letters are sometimes removed from the input afterwards):
const search = useRouteQuery('search', '', {
fromQuery: (value) => value,
toQuery: debounce((value) => value, 500),
});
But it breaks the query sync altogether. Would it be interesting to have such an option directly in the package?
Thanks