mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
18 lines
502 B
React
18 lines
502 B
React
import { Download } from "lucide-react";
|
|
import { exportTableToExcel } from "@/utils/excel.util";
|
|
|
|
export function buildSelectionActions({ exportConfig, 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 ?? getTableInstance(),
|
|
}),
|
|
},
|
|
];
|
|
} |