How can I change the sort field name in the dataStateChange event of the grid, to another fields name, and sort by that fields name?
for example, in my component the event handler:
public dataStateChange(state: AppDataStateChangeEvent): void { if(state.sort[0].field === 'propertyStringValue'){ state.sort[0].field = 'propertyNumberValue'; } this.view = process(this.data, this.gridState); }
I need this because we have two seperate properties on our data objects, one is "propertyStringValue" to display a formated version, and an actual number associated with it called "propertyNumberValue". And we want to sort by "propertyNumberValue" when the sort of the "propertyStringValue" is clicked.
When I do the above, it works only on first click, but in the following clicks the state of the dir property on the sort event object does not change, and stays at the value of "asc"