Since I could not find any information, I am writing here. How can I reset a selected value of igx-select using typescript:
Here is my HTML-Code:
<igx-select #selectDepartment placeholder="Wähle Abteilung" [overlaySettings]="overlaySettings" [ngClass]="[cell.row.deleted?'upfont' : 'drop-down-grid']" [(ngModel)]="cell.value"> <igx-select-item style="font-size: 12px;" *ngFor="let item of arrayDepartments" [value]="item"> {{ item }} </igx-select-item> </igx-select>
Is there any way to delete the value of the cell and show the placeholder when for example a button is clicked?
Hello Silvia,
Thank you for posting to Infragistics Community!
I have been looking into your question and my suggestion is to use an igx-icon in the igx-suffix of the select component. On the click event of the icon will execute a method that will be given two arguments: the cell and the event itself. In the method, you can set a new value to the cell as the placeholder or simply set an empty string, and with the event you can also prevent the drop-down container from opening. This will reset the igx-select value and achieve your requirements.
In addition, I have prepared a small sample illustrating my suggestion which could be found here.
Please test it on your side and let me know if you need any further assistance with this matter.
Regards,
Georgi Anastasov
Software Developer
Infragistics