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(@clack/prompts): add disabled option to select and multiselect prompts #161

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Mist3rBru
Copy link
Contributor

@Mist3rBru Mist3rBru commented Sep 5, 2023

This PR introduces a new disabled option for both the select and multiselect prompts. When this option is enabled, it prevents users from selecting the specified prompt's option. It's worth noting that while the multiselect prompt doesn't allow blocking the mark action, the disabled option will effectively block it upon submission.

Changes Made:

  • Added a disabled option to the select and multiselect prompts to allow blocking user selection.
  • Implemented functionality to prevent selection of prompts when the disabled option is enabled.
  • Ensured that the mark action is blocked in the multiselect prompt when it is disabled upon submission.

Demo:

2023-09-05_18-10-50.mov

Closes #122

@changeset-bot
Copy link

changeset-bot bot commented Sep 5, 2023

🦋 Changeset detected

Latest commit: 2740d3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clack/prompts Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Mist3rBru Mist3rBru marked this pull request as draft March 15, 2024 17:03
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.

[Request] Provide a disabled flag for Select and MultiSelect options
1 participant