Posted 15 March 2021, 10:55 am EST
Hi,
I am using wijmo listbox . I am adding new record to listbox after entering it into a textbox, but after adding the record the textbox is not cleared up.
I have tried giving this.fullname = ‘’ ,this.fullname = “”, this.fullname = ’ ’
But nothing is working .
How can i resolve this.
fullname: string;
addRecord() {
let item = this.recordData.find(cntry => cntry == this.fullname);
console.log(item);
if (!item) {
this.recordData.push(this.fullname);
this.name = new wjcCore.CollectionView(this.recordData);
}
else {
this.onShowAlertMessage(AlertType.danger_type, ‘Duplicate data cannot be added’);
}
}
input type=“text” [(ngModel)]=“fullname”
style=“width: 540px; height: 30px; margin-left: 30px;”>
<wj-list-box #ListData [itemsSource]=“name” (initialized)=“initListBox(ListData)”
[checkedMemberPath]=“showCheckboxes ? ‘checked’ : ‘’”
(selectedIndexChanged)=“displayListBoxValueInTextField(ListData)”>
<input *ngIf=“ListData.checkedMemberPath” type=“checkbox” tabindex=“-1” />
{{item}}
Thank you.
Regards,
Nivisha