We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The case A wish to conditionally display the answer line separate of that of the question line.
The problem Although suffix: '\n' can be used, sometimes it is not convenient when answer returns nothing.
suffix: '\n'
Potential solution A prefix / suffix function support will give more freedom to styling.
prefix
suffix
Example
import inquirer from "inquirer"; inquirer .prompt([ { type: 'checkbox', name: 'fruits', message: 'Select the fruits you like:', default: ['apple', 'apricot', 'banana', 'mandarin', 'orange'] , choices: ['apple', 'apricot', 'banana', 'mandarin', 'orange'], prefix: '', suffix: answers => answers.fruits.length === 0 ? '' : '\n ', }, ]) .then(() => { ... })
? Select the fruits you like: orange ? Next question
And, instead of
? Select the fruits you like: ? Next question
next is better:
Tia
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The case
A wish to conditionally display the answer line separate of that of the question line.
The problem
Although
suffix: '\n'
can be used, sometimes it is not convenient when answer returns nothing.Potential solution
A
prefix
/suffix
function support will give more freedom to styling.Example
And, instead of
next is better:
Tia
The text was updated successfully, but these errors were encountered: