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
The case
A wish to display questions (for reference) which are not asked through when property.
The problem when property just hides the question when its value is false.
Potential solution
A new property, or
an extra parameter to when property function
which will declare if a not-asked (not-activated) question should be displayed or not.
Example
importinquirerfrom"inquirer";inquirer.prompt([{type: 'confirm',name: 'fruit',message: 'Is it a fruit?',default: true},{type: 'confirm',name: 'sweet',message: 'Is it sweet?',default: true,when: function(answers,status){status.activated=answers.fruit ? false : true;status.displayed=true;returnstatus;},},{type: 'confirm',name: 'example',message: 'Is it a good example?',default: true,}]).then(()=>{
...
})
? Is it a fruit? Yes
? Is it sweet? Yes (# default value and, for example, in very light colour to imply that it's not activated)
? is it a good example? Y/n
...
Tia
The text was updated successfully, but these errors were encountered:
GHNewbiee
changed the title
Feature request: A not-asked Question to be able to be displayed
Feature request: A not-asked (not-activated) question to be able to be displayed
Jan 2, 2022
GHNewbiee
changed the title
Feature request: A not-asked (not-activated) question to be able to be displayed
Feature request: Option to display not-asked (not-activated) questions
Jan 3, 2022
The case
A wish to display questions (for reference) which are not asked through
when
property.The problem
when
property just hides the question when its value isfalse
.Potential solution
when
property functionwhich will declare if a not-asked (not-activated) question should be displayed or not.
Example
Tia
The text was updated successfully, but these errors were encountered: