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

Introduce MultiSelectPlus #303

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SIMULATAN
Copy link

@SIMULATAN SIMULATAN commented Feb 20, 2024

This PR introduces a new prompt: MultiSelectPlus.

This prompt extends on the existing MultiSelect, adding support for:

  • custom "checked" states
  • separate display text and item name
  • callbacks

This allows prompts like this:
asciicast showcasing new features

I created this feature specifically for SuperCuber/dotter#112. Therefore, it is slightly opinionated. I'd happily alter specifics of the implementation to align the new features with the rest of the library.

Note for reviewers: since I copy-pasted the multi_select.rs file, here's the diff between the two:
https://xgob.in/6p6sdiy1
(unfortunately, github doesn't allow you to upload .diff or .patch files..)

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

Successfully merging this pull request may close these issues.

1 participant