vueform / multiselect

Vue 3 multiselect component with single select, multiselect and tagging options (+Tailwind CSS support).
https://vueform.com
MIT License
808 stars 151 forks source link

Limit prop is not reactive #342

Closed slaweet closed 1 year ago

slaweet commented 1 year ago

Version

Description

When I specify the prop :limit="limitValue" on <Multiselect /> and later change the value of limitValue, then the number of displayed options stays the same as was the initial value of limitValue

The use case

I have a multiselect with a lot of options and it's very slow to put all of them into DOM at once. So I did an infinite-scroll approach that increases the limit only when the user scrolls to the bottom of the options list. Users can also search the options, so they might not need more than the limit number of options displayed to access any option. I considered the alternative to do a slice on the options array, but then the search would not work out of the box

Demo

https://jsfiddle.net/132czqLd/4/