Given this plunker:
https://plnkr.co/edit/9hyV14F1za869RuD0WAN
Steps:
-
Open console
-
Save state
-
Restore state
-
Notice message: 'sortChanged event has fired'
Expected
The event onSortChanged should not be fired.
Description
The restoration of the column state causes the grid to perform side operations that will throw events, this is not preventable as it is a core mechanism of the grid, BUT it might cause the user to react to unexpected events
Feature request
This is in our backlog and we are tracking it with the following reference and description.
AG-2013 Events - Add source to all events in ag-grid
You can follow the status of feature requests, bugs and releases using our pipeline:
https://www.ag-grid.com/ag-grid-pipeline/
Having this will let know the source of the event and then add logic to react accordingly
Workaround
Create a global boolean variable and set it to false and when restoring the grids state, set the global variable to true (and then back to false after restoring the grids state). Now in all event handlers, before executing any logic, first check if the global variable is true and if it is exit the handler.
Comments
0 comments
Please sign in to leave a comment.