-
Notifications
You must be signed in to change notification settings - Fork 161
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- OS: [macOS]
- Node Version: [v21.2.0]
- Package: [
@clack/prompts] - Package Version: [e.g. v0.7.0]
Describe the bug
- When i try to use group from @clack/prompts i get undefined as results
- If i just await group(... it print all in ones and i can't choose the values and does some strange glitch shows the outro but then it will removed it(video)
- The var that should have the values from group is undefined. Also in the video
- The onCancel method is not working. If i ctrl + c the program ends but not in the right way(video 2)
To Reproduce
Just create a group with select and multiselect
Steps to reproduce the behavior:
const templateGroup = await group(
{
language: async () => {
await select({
message: 'Select a language',
options: [
{label: 'Typescript', value: 'typescript'},
{label: 'Javascript', value: 'javascript'},
],
initialValue: 'typescript',
})
},
config: async () => {
await multiselect({
message: 'Select the config you want to use',
options: [
{value: 'tailwind', label: 'Tailwind'},
{value: 'tanstackQuery', label: 'Tanstack Query', hint: 'recommended'},
{value: 'zustand', label: 'Zustand', hint: 'recommended'},
{value: 'redux', label: 'Redux'},
],
initialValues: ['tailwind', 'tanstackQuery', 'zustand'],
required: true,
})
},
},
{
onCancel: () => {
console.log('Operation cancelled')
cancel('Operation cancelled')
process.exit(0)
},
},
)
outro(`You selected ${templateGroup.language} and ${JSON.stringify(templateGroup.config)} for your project!`)- Include reproduction steps
Expected behavior
I should get the values
Additional Information
Screen.Recording.2024-01-25.at.17.50.04.mov
Screen.Recording.2024-01-25.at.18.01.25.mov
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
