This commit is contained in:
rgrgogu
2026-05-12 12:47:13 +08:00
parent 1d94f27e61
commit 6e98ff0b5d
16 changed files with 211 additions and 20 deletions
@@ -8,14 +8,14 @@ import { exportTableToExcel } from "@/utils/excel.util";
* @param {Function} deps.archiveUser Archive handler from useManagement
* @param {Function} deps.deleteUser Delete handler from useManagement
*/
export function buildSelectionActions({ exportConfig, archiveGroup, archiveGroups }) {
export function buildSelectionActions({ exportConfig, archiveGroup, archiveGroups, getTableInstance }) {
return [
{
key: "export-selected",
label: "Export",
icon: <Download className="h-3.5 w-3.5" />,
onClick: (rows, table) =>
exportTableToExcel({ ...exportConfig, selectedRows: rows, tableInstance: table }),
exportTableToExcel({ ...exportConfig, selectedRows: rows, tableInstance: table ?? getTableInstance(), }),
},
{
key: "archive-selected",