Closed MasGaNo closed 4 years ago
@MasGaNo thx for your advice. i have done it and publish it as inquirer-file-tree-selection-prompt@1.0.3 you can install it with
npm i inquirer-file-tree-selection-prompt@1.0.3
usage
const answer = await inquirer.prompt([
{
type: 'file-tree-selection',
message: 'Choose folder',
onlyShowDir: true,
name: 'srcDir',
filter: (input) => {
return 'filteredValue';
},
validate: () => {
return 'invalid answer';
}
}
]);
Works like a charm 🙂
Thanks ^^
Hi!
First of all, nice job for this plugin, it works very well!
Then, is it possible to have
filter
andvalidate
method exposed in the prompt configuration like for the others built-in inquirer prompt type?Currently, when I'm doing something like:
Filter is not called.
I have currently an easy workaround, but it will be really nice to configure this prompt like the others one.
What do you think?