Front.fuzzyList(options, callback)
Display a list of elements with a search field (for quick selection).
You can pass extra parameters in addition of title
. They will still be in the item when the callback is called.
options: object
Field name | Type | Description |
---|---|---|
items | Object array | The objects to be displayed in the list. |
callback: function
A callback function.
Front.fuzzylist({
items: [
{title: 'Options 1'},
{title: 'Options 2'},
{title: 'Options 3'}
]
}, function (item) {
if (item)
console.log('User selected', item.title);
else
console.log('User canceled');
});