Closed josephbagnes closed 5 years ago
Came here for the same reason. The example written in the "new feature" isn't much clear and I'm struggling to understand which is the logic to use it.
let autoComp = CreateNewAutocompleteGroup(
'Search / choose in / from list',
'completer',
[
{ title: 'Option 1', id: '1' },
{ title: 'Option 2', id: '2' },
{ title: 'Option 3', id: '3' },
{ title: 'Option 4', id: '4' },
{ title: 'Option 5', id: '5' },
],
{ titleKey: 'title', childrenKey: null }
)
// set async function
autoComp.async = async (str):Promise<any> =>{
//add new Item to drop down
return [{ title: 'hello', id: '' }]
}
this.group = [
autoComp
];
Thanks. This is it yes.
Thanks a lot!
It would be really helpful if this is included. I'm struggling to load the data asynchronously. Thanks!