@gridsuite/commons-ui 0.111.0 → 0.112.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CsvExportProps } from './csv-export.type';
|
|
2
|
-
export declare function CsvExport({
|
|
2
|
+
export declare function CsvExport({ columns, tableNamePrefix, tableName, disabled, skipColumnHeaders, language, exportDataAsCsv, }: CsvExportProps): JSX.Element;
|
|
@@ -3,7 +3,6 @@ import { useCallback } from "react";
|
|
|
3
3
|
import { useCsvExport } from "./use-csv-export.js";
|
|
4
4
|
import { ExportCsvButton } from "./export-csv-button.js";
|
|
5
5
|
function CsvExport({
|
|
6
|
-
gridRef,
|
|
7
6
|
columns,
|
|
8
7
|
tableNamePrefix = "",
|
|
9
8
|
tableName,
|
|
@@ -14,8 +13,8 @@ function CsvExport({
|
|
|
14
13
|
}) {
|
|
15
14
|
const { downloadCSVData } = useCsvExport();
|
|
16
15
|
const download = useCallback(() => {
|
|
17
|
-
downloadCSVData({
|
|
18
|
-
}, [downloadCSVData,
|
|
16
|
+
downloadCSVData({ columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv });
|
|
17
|
+
}, [downloadCSVData, columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv]);
|
|
19
18
|
return /* @__PURE__ */ jsx(ExportCsvButton, { disabled, onClick: download });
|
|
20
19
|
}
|
|
21
20
|
export {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { AgGridReact } from 'ag-grid-react';
|
|
3
1
|
import { ColDef, CsvExportParams } from 'ag-grid-community';
|
|
4
2
|
import { GsLang } from '../../utils';
|
|
5
3
|
export type CsvDownloadProps = {
|
|
6
|
-
gridRef: RefObject<AgGridReact>;
|
|
7
4
|
columns: ColDef[];
|
|
8
5
|
tableName: string;
|
|
9
6
|
tableNamePrefix?: string;
|