You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The useDataTable is currently always adding "createdAt.desc" to the URL, as it is the default sort in the use-data-table schema constant.
This is an issue, as we might need "updatedAt" or another type of time sorting, or even no time sorting at all, like sorting simply by IDs.
It seems to me that we should make the schema a mandatory parameter for the use-data-table, so users can choose whether to default to "createdAt", somthing else or nothing at all (thus using the ID as it is the default in queries.ts).
Kind regards.
How to reproduce
Link to reproduction
Additional information
No response
The text was updated successfully, but these errors were encountered:
john093e
changed the title
[bug]: useDataTable -> Should receive the schema as parameter
[bug]: useDataTable -> Should receive the schema as parameter to avoid createdAt when not needed
Apr 15, 2024
john093e
changed the title
[bug]: useDataTable -> Should receive the schema as parameter to avoid createdAt when not needed
[Bug] useDataTable: Allow schema parameter to override default createdAt sort
Apr 15, 2024
Describe the bug
Hello @sadmann7,
The useDataTable is currently always adding "createdAt.desc" to the URL, as it is the default sort in the use-data-table schema constant.
This is an issue, as we might need "updatedAt" or another type of time sorting, or even no time sorting at all, like sorting simply by IDs.
It seems to me that we should make the schema a mandatory parameter for the use-data-table, so users can choose whether to default to "createdAt", somthing else or nothing at all (thus using the ID as it is the default in queries.ts).
Kind regards.
How to reproduce
Link to reproduction
Additional information
No response
The text was updated successfully, but these errors were encountered: