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

[Low Priority] An argument for limiting the number of selections in a multi select input #468

Open
3 tasks done
dmantisk opened this issue Nov 28, 2024 · 1 comment
Open
3 tasks done
Labels
feature request New feature or request

Comments

@dmantisk
Copy link

Please fill out these Check-boxes

  • I checked for existing similar feature requests
  • I have read the docs and checked that the feature I am requesting is not already implemented
  • My feature request consists of only one feature

Is your Feature Request related to a Problem or Annoyance?

This is NOT a necessary feature for me.
If it requires too much effort, please disregard this.

I'm mostly surprised that it wasn't already included.

Describe the Feature you'd like

Add and argument to specify the maximum number of selections that can be made.

i.e. If the new argument is limitSelect, then

```meta-bind
INPUT[multiSelect(
option(One),
option(Two),
option(Three),
limitSelect(2)]
```

Should produce a multi select list that will limit the maximum selection to 2

Alternatives

Maybe allow it to specify both max and minimum selections, and have the selections light up in the 'destructive' style (red) if the number of selections are above or below the range

Additional Context

This mainly for use with spaced repetition plugin for reviewing MCQs.

@dmantisk dmantisk added the feature request New feature or request label Nov 28, 2024
@mProjectsCode
Copy link
Owner

If this is added, it should be added for all list like input fields. Maybe the already existing limit argument for text fields can be reused.

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

No branches or pull requests

2 participants