You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand that it is normal to be zero based, but is an exposed API, why we should think about it.
Btw, from here we can see one problem. Consider the example
asyncfunctionrun(){constresponse=awaitprompts({type: 'select',name: 'type',message: 'What is the type of the change?',choices: [{title: 'Fixing a bug',value: 'fix'},{title: 'New feature',value: 'feat'},{title: 'Breaking change',value: 'major'},{title: 'Non code changes',value: 'chore'},{title: 'Documentation changes',value: 'docs'},],initial: 3,});console.log(response);// => { type: 'chore' }}run()
then click Enter. The response is correct, it selects the fourth (cuz it is zero based, okey). But visually it is not selected when run the program - it stays on the Fix a bug. I'll record asciinema record. So you can see what i'm talking.
I'm agree on that, what about the another? When initial is set i believe that the arrow in the list should be there (in this case in the fourth item) and not always on the first one. And when the user just enter it should show the title of the selected initial item (in this case Non code changes) and not Fix a bug - it's probably because the arrow is on the first item.
One more issue, sorry but.. 😆
I understand that it is normal to be zero based, but is an exposed API, why we should think about it.
Btw, from here we can see one problem. Consider the example
then click Enter. The response is correct, it selects the fourth (cuz it is zero based, okey). But visually it is not selected when run the program - it stays on the
Fix a bug
. I'll record asciinema record. So you can see what i'm talking.https://asciinema.org/a/166247 or
![](https://camo.githubusercontent.com/9bf7e98240c2a2501176b1172748adba3f67f37f0a764b562ac1a1eb51f6868b/68747470733a2f2f61736369696e656d612e6f72672f612f3136363234372e706e67)
The text was updated successfully, but these errors were encountered: