[X] Considered the value versus complexity for all users of the library as well as library maintenance
[X] Considered if this can be a storybook or documentation example
Hi JBetancur and all.
Long time listener...
I notice looking at the code and docs that there's no requirement in the code that sortField be a string and beyond that it isn't "strictly necessary" in RDTC since the column type is typed as an interface. I was confused by sortField being there since it is so close to sortFieldId but does not participate in that system.
Could the column be typed in a way that retains full knowledge of that type when returned to onSort, TableColumn.cell etc? maybe export type TableProps<T, Column extends TableColumn<T>= TableColumn<T>>?
This would resolve sortField, but also make things like Column based rendering more available in the system. (Its already possible, but not mentioned anywhere, as far as I can tell)
Feature Check list
Hi JBetancur and all. Long time listener...
I notice looking at the code and docs that there's no requirement in the code that sortField be a string and beyond that it isn't "strictly necessary" in RDTC since the column type is typed as an interface. I was confused by sortField being there since it is so close to sortFieldId but does not participate in that system.
Could the column be typed in a way that retains full knowledge of that type when returned to onSort, TableColumn.cell etc? maybe
export type TableProps<T, Column extends TableColumn<T>= TableColumn<T>>
? This would resolve sortField, but also make things like Column based rendering more available in the system. (Its already possible, but not mentioned anywhere, as far as I can tell)Would be happy to make a PR if thats interesting.
Thanks for your hard work Alex Mouton