PDA

View Full Version : Checkbox grid does not remember selection with pruneRemoved=false



WPriyanka
1 Mar 2017, 4:38 AM
I have Used BufferedStore and CheckboxSelectionModel.
Steps to Reproduce:
1) Create a buffered store with checkbox selection model and pruneRemoved should be false. This store will be used in a grid
2) The Data for this grid should be large enough for pruning to work on scrolling
3) Now check the first entry or select all checkbox ie header checkbox
4) Now using scroll-bar and mouse, scroll quickly up and down in a way that pruning occurs and the first record gets removed and header checkbox selection get removed.
5) Now go back to first entry/row, the checkbox will get removed.

i am using extjs 4.1

Until this issue is fixed, can you please provide the workaround.

Thanks

Gary Schlosberg
10 Mar 2017, 4:01 PM
Support for Ext JS 4 ended on December 31st, so I don't see this getting fixed. Have you tested against newer versions of 4.x to see if perhaps the issue is resolved?

valgussev
6 Jun 2017, 8:13 AM
I've been able to reproduce the issue on 6.2.1 version, see the https://fiddle.sencha.com/#fiddle/2104

Gary Schlosberg
7 Jun 2017, 11:07 AM
I believe that this is expected without unique keys.


Also, when previously pruned pages are returned to the cache, the records objects in the page will be new instances, and will not match the instances in the selection model's collection. For this reason, you MUST ensure that the Model definition's idProperty references a unique key because in this situation, records in the Store have their IDs compared to records in the SelectionModel in order to re-select a record which is scrolled back into view.

http://docs.sencha.com/extjs/6.2.1/classic/Ext.selection.CheckboxModel.html#cfg-pruneRemoved

valgussev
7 Jun 2017, 11:14 AM
As I can see from the following GET request reply
https://www.sencha.com/forum/topics-browse-remote.php?page=1&start=0&limit=2
threadid is unique and immutable.