Change RowId to fileid #5227
Unanswered
suzushi-tw
asked this question in
Q&A
Replies: 2 comments
-
Hi, I don't know if this is still relevant but I had to deal with the same thing yesterday so... interface TableProps<T> {
columns: ColumnDef<T>[];
data: D[];
rowId: keyof D;
...
} This way, I am instantiating the table in my component as const table = useReactTable({
columns,
data,
getRowId: (row) => row[rowId],
...
}); Hope this will help |
Beta Was this translation helpful? Give feedback.
0 replies
-
Try to extend; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys, I am trying to create a button in data-table so when user clicks on it, it can send a string of fileid that the user selected into updatefileselection(fileIdString), which will pass it on into serveraction and DB. After some research I think the best way to do so is replacing the rowid with the fileid directly, and combining with get selectedrows, will it then return the updated id? But I am stuck on TData does not contain the property. Here's my code for column.tsx and data-table.tsx. Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions