We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db47694 commit e64bc2cCopy full SHA for e64bc2c
.changeset/little-horses-sort.md
@@ -0,0 +1,5 @@
1
+---
2
+'@clack/prompts': patch
3
4
+
5
+feat: add `disabled` option to `select` and `multiselect` prompts
packages/prompts/src/index.ts
@@ -267,10 +267,7 @@ export interface SelectOptions<Value> {
267
}
268
269
export const select = <Value>(opts: SelectOptions<Value>) => {
270
- const opt = (
271
- option: Option<Value>,
272
- state: 'inactive' | 'active' | 'selected' | 'cancelled'
273
- ) => {
+ const opt = (option: Option<Value>, state: 'inactive' | 'active' | 'selected' | 'cancelled') => {
274
const label = option.label ?? String(option.value);
275
switch (state) {
276
case 'selected':
0 commit comments