Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit prop is not reactive #342

Closed
slaweet opened this issue May 26, 2023 · 0 comments
Closed

Limit prop is not reactive #342

slaweet opened this issue May 26, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@slaweet
Copy link
Contributor

slaweet commented May 26, 2023

Version

  • Vue version: both 2 and 3

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/

@adamberecz adamberecz added the bug Something isn't working label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants