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
Hi, I believe this is an important function for a table.
From @thien-do suggestion, the idea would be:
interface TableColumn { title:ReactNode; render: | keyof R // Accessor | ((row: R, index: number) => ReactNode); sortable: true | undefined | () => void; }
if sortable === undefined: not thing happen
if sortable === “true” -> client side, internal sort
//Client-side sorting: sortable: () => { const newData = data.sort(something); setData(newData); } //Server-side sorting: sortable: () => { const newData = await getNewData({ sort: “abc” }); setData(newData) }
Sortable table column example:
https://material-ui.com/components/tables/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi, I believe this is an important function for a table.
From @thien-do suggestion, the idea would be:
if sortable === undefined: not thing happen
if sortable === “true” -> client side, internal sort
Sortable table column example:
The text was updated successfully, but these errors were encountered: