oria / gridx

Just another powerful Dojo grid
Other
162 stars 78 forks source link

Selection on previous page got unselected when using "IndirectSelectColumn" + "extendedSelectRow" + "pagination" #437

Open laurenng22 opened 4 years ago

laurenng22 commented 4 years ago

I am using IndirectSelectColumn, ExtendedSelectRow, and Pagination in my grid.

Issue: When using shift+click (on checkboxes) to select some rows on page 2, it also unselects the start index of the row on page 1. Please see "Steps to reproduce" section for more details.

Steps to reproduce:

  1. Create a grid with pagination and header check box selection (IndirectSelectColumn). Make sure that the grid has at least 2-3 pages.
  2. Now on page 1, select rows from 5-11. You can see the checkboxes are checked on rows 5-11 which is good.
  3. Navigate to page 2, click the checkbox on row 6 to select it then shift+click on next row to select one more row. You can see the checkboxes are checked on rows 6 and 7 on page 2 which is correct.
  4. Now navigate back to page 1, you can see that the checkbox on row 6 is unselected. It should be checked still.

Expected behavior Selection should be kept intact when making selection (using shift+click) from page to page.

Please tell us about your environment: OS : Windows10 Browser: Chrome 80.0.3987.149 (64bit) GridX version: 1.3.8

I suspect that this is caused by gridx/modules/extendedSelect/_Base and gridx/modules/extendedSelect/Row where it does the start/end selection but didn't take the paging into account.