selectedIndexChanged wjcombo box

Posted by: riya.katawate16 on 16 August 2022, 10:17 pm EST

  • Posted 16 August 2022, 10:17 pm EST

    Hi,

    selectedIndexChanged gets called by default. I want to call a function when dropdown value is changed.

     <wj-combo-box [itemsSource]="ledgerTypes" [(selectedItem)]="selectedLedgerType" (selectedIndexChanged)="OnLedgerTypeChanged()">
              </wj-combo-box>
    

    Please help.

  • Posted 17 August 2022, 6:14 pm EST

    Hello,

    This issue has already been addressed on a different forum thread, you can refer to this forum thread link for the same: https://www.grapecity.com/forums/wijmo/wj-auto-complete-selectedi_1

    Here is a copy of the answer:

    It happens because, by default, the first item is selected in ComboBox. So, the selectedIndexChanged event fires for setting selectedIndex as 0.

    However, you can check whether the event is raised by user selection or not by setting the flag in the isDroppedDownChanged event. Please refer to the sample link below for the same:

    https://stackblitz.com/edit/angular-zzry1k?file=src%2Fapp%2Fapp.component.ts

    Regards

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels