Closed junip closed 5 years ago
Hi I am doing like this, but it answers returns empty string
function searchUser(answers, input) { var names = [ { name: "Test1", accountId: "a746hsjikel" }, { name: "Test2", accountId: "982bjkkgkbnd" } ] return new Promise(function(resolve) { setTimeout(function() { var options = { extract: function(el) { return el.name; } }; var fuzzyResult = fuzzy.filter(input, names, options); resolve( fuzzyResult.map(function(el) { return el.string; }) ); }, 2000); }); } inquirer .prompt([ { type: "autocomplete", name: "test", message: "Search user", source: searchUsers, pageSize: 4, suggestOnly: true } ]) .then(function(answers) { console.log(JSON.stringify(answers, null, 2)); });
Closing the issue , it is working fine after removing suggestOnly
suggestOnly
Hi I am doing like this, but it answers returns empty string