vue-use-route-query icon indicating copy to clipboard operation
vue-use-route-query copied to clipboard

Debounce option?

Open nicooprat opened this issue 1 year ago • 3 comments

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

nicooprat avatar Jul 18 '24 15:07 nicooprat