The documentation for implementing a custom sortFunction seems to be incorrect.
The documentation gives this short code snippet:
Code: Select all
const mysort = (event) => {
//event.data = Data
//event.field = Field to sort
//event.order = Sort order
//event.multiSortMeta = An array of SortMeta objects to sort the data by default in multiple sort mode.
}
However, in practice (and when looking through the source code), the function takes a single parameter of type
ColumnSortParams, which only has a
field and
order property. I don't have easy access to the table data where I implement my columns, so not passing it as part of the sortFunction event/parameters is causing me problems and is unexpected given the documentation.
Am I missing something?