onClick(event) {
var input = $('#myautocomplete').val();
if (input.length > 0) {
var obj = $("#myautocomplete").ejAutocomplete("instance");
obj.model.dataSource.push(input);
obj._doneRemaining();
}
|
HTML:
<input type="text" id="myautocomplete" ej-autocomplete [dataSource]="dataList" [filterType]="filtervalue" watermarkText="Select a Car"
[highlightSearch]="true" [showPopupButton]="true" width="100%" />
TS:
this.filtervalue= ej.filterType.Contains;
|
[HTML]
<input ej-button id="myButton" [height]="searchByOthentComponent" (click)="onClick($event)" />
[TS]
onClick (event) {
if (! ej.isNullOrUndefined(event.model))
{
//your change event code. //where event.model comprises of model values of ejButton
console.log ("Button Click Event Triggered.");
//event.model doesn’t present in the event raises from angular
}
} |