ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

[saveState | externalSorting] external sorting listener invoked without arguments on state restore

Open lpand opened this issue 11 years ago • 2 comments

Hi, external sorting and saveState plugin don't play nice together. I made a demo out of the saveState plugin tutorial.

  1. change sorting of a column
  2. save state
  3. change sorting again
  4. restore state

The sorting listener has been called without arguments while the column appears with the little triangle on it.

P.S. thanks for the great job

lpand avatar Jun 17 '15 15:06 lpand

This seems to be the guilty line:

https://github.com/angular-ui/ng-grid/blob/master/src/features/saveState/js/saveState.js#L552

I'll create a pull request if you agree.

lpand avatar Jun 17 '15 15:06 lpand

So the problem is that it didn't provide the sort column that changed in the call? If that's what you're fixing then yeah, happily would accept a PR.

PaulL1 avatar Jun 22 '15 18:06 PaulL1