-
i want to make a feature that need the data from selected key so i can use the data for crud operation in bulk
if you need any further details please tag me |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
How can i get all key value when click select all. because selectedkey return "all" |
Beta Was this translation helpful? Give feedback.
-
Hi, @ru-dr your table should have an id field and then get the id with selectedKeys
|
Beta Was this translation helpful? Give feedback.
Hi, @ru-dr your table should have an id field and then get the id with selectedKeys
<div className="flex flex-col gap-3"> <Table aria-label="Rows actions table example with dynamic content" selectionMode="multiple" selectedKeys={selectedKeys} onSelectionChange={setSelectedKeys} > <TableHeader columns={columns}> {(column: any) => <TableColumn key={column.key}>{column.label}</TableColumn>} </TableHeader> <TableBody items={rows}> {(item: any) => ( <TableRow key={item.id} > {(columnKey) => <TableCell>{getKeyValue(item, columnKey)} </TableCell>} </TableRow> )} </TableBody> </Table> <p>{selectedKeys}</p> </div>