-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(demo): we should be able to move row(s) and keep selections #352
Conversation
ghiscoding
commented
May 26, 2021
•
edited
Loading
edited
- grid state should only be allowed to change row selection only when Pagination is enabled
- refactor some part of the code to use more optional chaining (?.) syntax for cleaner and smaller code
- move around some of the Cypress tests so that it makes sure that moving rows will keep row selections
- grid state should only be allowed to change row selection only when Pagination is enabled - refactor some part of the code to use more optional chaining (?.) syntax for cleaner and smaller code - move around some of the Cypress tests so that it makes sure that moving rows will keep selections
Codecov Report
@@ Coverage Diff @@
## master #352 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 212 212
Lines 13241 13230 -11
Branches 4340 4337 -3
=========================================
- Hits 13241 13230 -11
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor comment
@@ -258,9 +258,9 @@ export class GridStateService { | |||
*/ | |||
getCurrentPagination(): CurrentPagination | null { | |||
if (this._gridOptions.enablePagination) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like _gridOptions can be null sometimes. If you check null on line 260 with "?.", you can remove the "?." on line 261.
- previous PR #352 that fixed row selection with row move actually caused a regression with toggling of pagination, when removing Pagination on the fly it will show all items in the grid and there is code in the Grid State Service that will take row selections from all page and reselect them when we toggle to No Pagination, and we need to change our `enablePagination` only after that Grid State Service is finished else we end up missing row selection from all other pages