Need help!!
jcpc91 opened this issue · 0 comments
jcpc91 commented
Hi i hope someone can help me?
I need modify the source. when the user write a name if doesn't exist i need keep the name written
and then if the user wants to update the record set the name if exist selected if not just show the name
----****************----------
the documentation say i need call setSelectItem function
so i need modify this function
SelectItem(item: AutocompleteItem | string) {
let i: AutocompleteItem;
if (typeof item === 'string') {
i = this._items[item];
this._DOM.selected = item;
}
///if doesn't exist just show the name of the client
else {
i = item;
this._DOM.selected = SearchableAutoCompleteString(item.title, item.id);
}
this._completer = i.title;
this._highlight = '';
this.dropdown.Close(null, true);
this.selected.emit({group: {key: this.group.key}, item: i});
}
sorry for may english !!