Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 committed Jun 21, 2024
1 parent 4b6b242 commit 0fca6dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/prompts/group-multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export default class GroupMultiSelectPrompt<T extends { value: any }> extends Pr
break;
case 'down':
case 'right':
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
if (!this.#selectableGroups && this.options[this.cursor].group === true) {
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
}
break;
case 'space':
Expand Down
4 changes: 3 additions & 1 deletion packages/prompts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ export const groupMultiselect = <Value>(opts: GroupMultiSelectOptions<Value>) =>
} else if (state === 'submitted') {
return `${color.dim(label)}`;
}
return `${color.dim(prefix)}${isItem || selectableGroups ? color.dim(S_CHECKBOX_INACTIVE) : ""} ${color.dim(label)}`;
return `${color.dim(prefix)}${
isItem || selectableGroups ? color.dim(S_CHECKBOX_INACTIVE) : ''
} ${color.dim(label)}`;
};

return new GroupMultiSelectPrompt({
Expand Down

0 comments on commit 0fca6dc

Please sign in to comment.