framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.04k stars 3.23k forks source link

Searchbar component needs a debounce on search #4146

Open fmp777 opened 1 year ago

fmp777 commented 1 year ago

Is your feature request related to a problem? Please describe. UI gets really lagged when Searchbar handles the element filter

Describe the solution you'd like Add a simple 300 second debounce to the built-in element filter - can consider adding it as a parameter like debounce: 0 for default or debounce: 300 to specify the ms. I would recommend changing behavior to 300 by default, as I cannot imagine anyone really wants 10 searches to popoff before the person stops typing their query.

Describe alternatives you've considered I've already written my own debounced customSearch, but sad to do this when the component already does what is needed (and beautifully so)

Simone4e commented 1 year ago

Can you create codesandbox for reproduce that error?