Current filter:
                                You should refresh the page.
                                  • Conditions:
                                    1. Pagination enabled.
                                    2. CustomStore used.
                                    3. Initially selected item is not on the first data page (there is no difference how pass initial selection value -- using bindings or api call).

                                    Result:
                                    DxList starts to reload data and fires onSelectionChanged event infinitely (see screenshot).

                                    Use this as component template:
                                    [HTML]
                                    <dx-list selectionMode="single" keyExpr="ProductID" [dataSource]="dataSourceConfiguration" [selectedItemKeys]="selectedKeys" pageLoadMode="nextButton" itemTemplate="data" (selectedItemKeysChange)="listSelectedItemKeysChangedHandler($event)" (onSelectionChanged)="listSelectionChangedHandler($event)" ><div *dxTemplate="let item of 'data'">{{item.ProductID}} : {{item.ProductName}}</div></dx-list>
                                    Use this in component code:
                                    [JavaScript]
                                    import {createStore} from 'devextreme-aspnet-data-nojquery'; export class SomeComponent { /* ... */ protected selectedKeys = [43]; protected dataSourceConfiguration = { store: createStore({ loadUrl: 'https://js.devexpress.com/Demos/Mvc/api/ListData/Orders' }), paginate: true, pageSize: 10, }; protected listSelectedItemKeysChangedHandler(keys: number[]) { console.log(`Selected keys changed: ${keys}`); } protected listSelectionChangedHandler(ev) { const sel = ev.component.option('selectedItemKeys'); console.log(`Selection: ${sel}`); } }
                                    Product with ID 43 is not on the first page. It looks like if we try to select item that is not on the first page, DxList tries to reload data and fires selection changed event each time it reloads data.

                                    The same problem exists if no paging enabled but selected Id is not in loaded data source (for example if some filters applied).

                                    With ArrayStore this problem don't reproducible.



                                    This bug brokes very important component in our app.
                                • Nikolai (DevExpress Support) 12.17.2018
                                  Hi Vladislav,

                                  Would you please modify the https://codesandbox.io/s/wyvk70wjp7 example to show the issue and send it back to us?
                                • Vladislav Kiselev 12.17.2018
                                  https://codesandbox.io/s/k132r84l6r

                                  As you can see, I just copy and paste code listed above into the sample.
                                • Alisher (DevExpress Support) 12.17.2018
                                  Hi Vladislav,

                                  Thank you for sharing the example project. I have successfully reproduced the issue. We need additional time to investigate the issue. We will inform you of our results.
                                • Lanette (DevExpress Support) 12.18.2018
                                  Hello,

                                  I have passed this issue to our developers for further research. We will update this thread once we have any results.

                                1 Solution

                                Creation Date Importance Sort by