Skip to content

Conversation

@orochaa
Copy link
Contributor

@orochaa orochaa 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: e64bc2c

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

@orochaa orochaa marked this pull request as draft March 15, 2024 17:03
@orochaa orochaa force-pushed the select-disabled-flag branch from c9e0d5d to c1b62d1 Compare March 10, 2025 14:45
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 10, 2025

Open in Stackblitz@example/basic@example/changesets

npm i https://pkg.pr.new/bombshell-dev/clack/@clack/core@161
npm i https://pkg.pr.new/bombshell-dev/clack/@clack/prompts@161

commit: e64bc2c

@orochaa orochaa marked this pull request as ready for review March 10, 2025 14:46
@orochaa orochaa force-pushed the select-disabled-flag branch from c1b62d1 to e64bc2c Compare March 10, 2025 14:51
@orochaa orochaa closed this May 11, 2025
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