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

Question - Custom filter for max item number #534

Open
Nightshadelink opened this issue Oct 26, 2023 · 0 comments
Open

Question - Custom filter for max item number #534

Nightshadelink opened this issue Oct 26, 2023 · 0 comments

Comments

@Nightshadelink
Copy link

Nightshadelink commented Oct 26, 2023

          I don't think there's an easy way to do this. You'll have to use custom filters and a counter to hide any item that's past your visible counter.

Originally posted by @Vestride in #270 (comment)

How would such a Filter work? Say i have this:

function handleFilterChange(evt) {
  var input = evt.currentTarget;
  if (input.checked) {
    myShuffle.filter(input.value);
    myShuffle.sort(options);
  }
}

which filteres on value on click of the coresponding button but i want to cap the max item number to 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants