Sfoglia il codice sorgente

fix(dashboard): Fix data passed to single-row bulk action

Michael Bromley 2 mesi fa
parent
commit
605de62b4c

+ 5 - 1
packages/dashboard/src/lib/components/data-table/use-generated-columns.tsx

@@ -252,7 +252,11 @@ function getRowActions(
                             </DropdownMenuItem>
                         ))}
                         {bulkActions?.map((action, index) => (
-                            <action.component key={`bulk-action-${index}`} selection={[row]} table={table} />
+                            <action.component
+                                key={`bulk-action-${index}`}
+                                selection={[row.original]}
+                                table={table}
+                            />
                         ))}
                         {deleteMutation && (
                             <DeleteMutationRowAction deleteMutation={deleteMutation} row={row} />