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

[sortChanged Event] Doc and Implementation Mismatch - What Should We Do?

Open lpand opened this issue 10 years ago • 2 comments

Documentation and implementation of the sortChanged event don't match. The documentation says the callback is invoked with just the sorted columns array, whereas in at least two different places (Core and Save State) the event is raised with the grid and list of columns. If this behavior is coherent across event callback signatures, that is the first argument is always the grid, i'd say let's change the doc, otherwise the code (and i could make a pull request). What do you think about it?

lpand avatar Jan 18 '16 18:01 lpand

I haven't dug into it, but for a lot of API's, sending the grid is redundant. The api has a reference to the grid, so it doesn't need it as an argument. But that would be a breaking change so it's best for now to fix the doc.

swalters avatar Jan 23 '16 16:01 swalters

Ok, i'll make a pull request with the edited documentation.

lpand avatar Jan 29 '16 14:01 lpand