metonym / svelte-typeahead

Accessible, fuzzy search typeahead component
https://metonym.github.io/svelte-typeahead
MIT License
226 stars 18 forks source link

Limit the number of matching items? #16

Closed PlkMarudny closed 3 years ago

PlkMarudny commented 3 years ago

Is there any way to limit the number of returned matches, to 10 for example?

metonym commented 3 years ago

Released in v2.4.0

Specify the maximum number of results using the limit prop. The default value if Infinity.

<Typeahead limit={2} {data} {extract} />
PlkMarudny commented 3 years ago

Indeed, it works @2.4.0, apparently did not @2.3.0, thank you very much.