We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is your feature request related to a problem? Please describe.
We want to migrate from our teams DataTable to EDS Data Grid.
To be able to use the Data Grid with backend sorting we need to be able to access and control the state.
Enabling this feature allows us to:
Describe the solution you'd like
Exposing the following props/functionality would enable us to do this.
manualSorting
onSortingChange
state.sorting
useReactTable
There might be other ways of doing this, but we found that separating internal and external/controlled state as a good approach that doesn't introduce too much complexity. See https://github.com/equinor/apollo-react-components/blob/8d49a7ff0a252aa227880ad9e2d94e5e00462e3e/packages/apollo-components/src/DataTable/DataTable.tsx#L94-L99.
Describe alternatives you've considered
It should be fairly simple to add this feature, since we only need to expose native Tanstack Table props.
You might also look into how Material React Table have implemented thing:
Experience from developing our own DataTable component. I would recommend avoiding nesting props of the EDSDataGrid, such as
sorting: { enable: true, manual: true, state: ..., onChange: ... }
This makes the functionality harder to find from just searching the props and it's easier to introduce breaking changes to the API.
Additional context
I'd be happy to help implementing this 😄
The text was updated successfully, but these errors were encountered:
Hi @mholta - if you can create a PR for this, that would be great! Feel free to contact me if you have any questions! :)
Sorry, something went wrong.
@mholta We can add you to the @equinor/eds-contributors group if you’re going to create a PR. Or should we add somebody else from your team?
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
We want to migrate from our teams DataTable to EDS Data Grid.
To be able to use the Data Grid with backend sorting we need to be able to access and control the state.
Enabling this feature allows us to:
Describe the solution you'd like
Exposing the following props/functionality would enable us to do this.
manualSorting
prop from react table directly (https://tanstack.com/table/v8/docs/api/features/sorting#manualsorting)onSortingChange
prop from react table directly (https://tanstack.com/table/v8/docs/api/features/sorting#onsortingchange)state.sorting
prop fromuseReactTable
directly (https://tanstack.com/table/v8/docs/api/features/sorting#state)There might be other ways of doing this, but we found that separating internal and external/controlled state as a good approach that doesn't introduce too much complexity. See https://github.com/equinor/apollo-react-components/blob/8d49a7ff0a252aa227880ad9e2d94e5e00462e3e/packages/apollo-components/src/DataTable/DataTable.tsx#L94-L99.
Describe alternatives you've considered
It should be fairly simple to add this feature, since we only need to expose native Tanstack Table props.
You might also look into how Material React Table have implemented thing:
Experience from developing our own DataTable component. I would recommend avoiding nesting props of the EDSDataGrid, such as
This makes the functionality harder to find from just searching the props and it's easier to introduce breaking changes to the API.
Additional context
I'd be happy to help implementing this 😄
The text was updated successfully, but these errors were encountered: