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

feat: Limit maximum selections in mo.ui.multiselect #996

Merged
merged 7 commits into from
Mar 25, 2024
Merged

feat: Limit maximum selections in mo.ui.multiselect #996

merged 7 commits into from
Mar 25, 2024

Conversation

wasimsandhu
Copy link
Collaborator

@wasimsandhu wasimsandhu commented Mar 24, 2024

This PR adds an optional parameter to mo.ui.multiselect to limit the maximum number of selections that can be made (see Issue #920).

  • Add max_selections parameter to mo.ui.multiselect
  • Validate user input before passing to component
  • Ignore setValue for MultiselectPlugin if len(newValues) > maxSelections
  • Write unit tests

Copy link

vercel bot commented Mar 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2024 7:42am
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 24, 2024 7:42am

Copy link

github-actions bot commented Mar 24, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@wasimsandhu
Copy link
Collaborator Author

I have read the CLA Document and I hereby sign the CLA

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome change, thank you for the contribution!

@mscolnick mscolnick merged commit d12191f into marimo-team:main Mar 25, 2024
25 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants