selectedIndexChanged event keeps on firing and never stops

Posted by: parmarkinjalk on 2 November 2018, 1:46 pm EST

  • Posted 2 November 2018, 1:46 pm EST

    
    <wj-flex-grid-column [binding]="clientStatusName" [width]="'0.90*'" [cssClass]="'italic'"
                [header]="'Client Status'" [minWidth]="30" >
                    <template wjFlexGridCellTemplate [cellType]="'ColumnHeader'" let-cell="cell">
                        <div [wjTooltip]="'#clientStatusToolTip'">
                            <label class="hoverTxt" >Client Status</label>
                            <span class="wj-glyph-filter" (click)="onFilterClick(cell)"></span>
                        </div>
                        <div style="text-align: left;">
                            <wj-combo-box [itemsSource]="clientStatusRefData" [placeholder]="'Select'" class="gridHeaders" [(selectedItem)]="copyBelowObj.clientStatusCode"
                                [isRequired]="false" [displayMemberPath]="'codeNm'" [selectedValuePath]="'codeKey'" style="width: 80%"></wj-combo-box>
                            <span [wjTooltip]="'Copy Below'" (click)="copyBelowValues(copyBelowObj.clientStatusCode,{property:'clientStatusCode', displayNameProperty: 'clientStatusName'})">
                                <img src="assets/images/copy-below.png" style="width: 11px;" />
                            </span>
                        </div>
                    </template>
                    <template wjFlexGridCellTemplate [cellType]="'Cell'" let-cell="cell">
                        <wj-combo-box #clientCd [itemsSource]="clientStatusRefData" [isRequired]="false" [isEditable]="false" [(selectedValue)]="cell.item.clientStatusCode"
                            [displayMemberPath]="'codeNm'" [selectedValuePath]="'codeKey'" (selectedIndexChanged)="onGridDropDownChange(clientCd.selectedItem,cell.item,{property:'clientStatusCode', displayNameProperty: 'clientStatusName'})"></wj-combo-box>
                    </template>
            </wj-flex-grid-column>
    
    

    I have multiple columns almost similar to the above code on the same HTML page and for every column and every row the “selectedIndexChanged” event keeps on firing continuously and never stops on chrome. But in IE the event is fired for visible rows only, as I scroll down the list, the event keeps firing for every row that comes into screen

  • Posted 2 November 2018, 1:47 pm EST

    Issue is on Angular 2 and Wijmo build 5.20171.300

  • Posted 6 November 2018, 12:19 am EST

    But in IE the event is fired for visible rows only, as I scroll down the list, the event keeps firing for every row that comes into screen

    <<<<<<<<<<<<<<<<<

    This is expected because after creating the combo-box, grid changes its selected value by assigning it the cell’s value.

    “selectedIndexChanged” event keeps on firing continuously and never stops on chrome

    <<<<<<<<<<<<<<<<<

    This is unexpected, the selectedIndexChanged should be fired only once and only for the visible rows(as in case of IE).

    It might be that selectedIndexChanged handler (onGridDropDownChange()) is performing some action which is causing the grid to refresh again and hence triggering the selectedIndexChanged again. Can you please also share a snippet of your onGridDropDownChange() method?

    You may also send a small sample (reproducing the issue) for us to debug.

    ~Sharad

Need extra support?

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

Learn More

Forum Channels