Replies: 1 comment
-
@Eralmidia I have created a small sample trying to reproduce the described behavior. I am setting the initial sorting state of the Grid by passing an array of sorting expressions to its sortingExpressions property. On my side everything works as expected and the onGroupingDone event is not emitted when the sortingExpressions property is set. Please test the sample on your side and let me know how it behaves. If this is not an accurate demonstration, please feel free to modify it and send it back to me along with steps to reproduce. Alternatively, if the behavior cannot be replicated, please feel free to provide your own isolated sample, where the issue is reproducible. Please keep in mind to remove any dependencies and code that is not directly related to the issue. Having a sample, which I can debug on my side, will be highly appreciated and extremely helpful for providing you with solution as soon as possible. Thank you for your cooperation. Looking forward to hearing from you. |
Beta Was this translation helpful? Give feedback.
-
Question
I have a grid, in which I want to store the grouping state to settings on the server, and then load and reapply the grouping when the page is loaded. In order to save the settings, I listen to the onGroupingDone event. However, it seems like this event is triggered also when the grid is initialized (setting the sortingExpressions input). Is this by design, and if it is, how can I determine if the sorting was the initial assignment of grouping expressions or a subsequent grouping done by the user (which should be saved)?
I guess the initial grouping will always be the first one, so maybe I could do an rxjs skip(1), but that doesn't feel particularly robust.
Beta Was this translation helpful? Give feedback.
All reactions