Skip to content

Commit aea68e5

Browse files
authored
remove gridref prop from CsvDownloadProps (#804)
Signed-off-by: Abdelsalem <[email protected]>
1 parent 515d05c commit aea68e5

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/components/csvDownloader/csv-export.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { useCsvExport } from './use-csv-export';
1111
import { ExportCsvButton } from './export-csv-button';
1212

1313
export function CsvExport({
14-
gridRef,
1514
columns,
1615
tableNamePrefix = '',
1716
tableName,
@@ -22,8 +21,8 @@ export function CsvExport({
2221
}: CsvExportProps): JSX.Element {
2322
const { downloadCSVData } = useCsvExport();
2423
const download = useCallback(() => {
25-
downloadCSVData({ gridRef, columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv });
26-
}, [downloadCSVData, gridRef, columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv]);
24+
downloadCSVData({ columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv });
25+
}, [downloadCSVData, columns, tableName, tableNamePrefix, skipColumnHeaders, language, exportDataAsCsv]);
2726

2827
return <ExportCsvButton disabled={disabled} onClick={download} />;
2928
}

src/components/csvDownloader/csv-export.type.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,10 @@
55
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
66
*/
77

8-
import { RefObject } from 'react';
9-
import { AgGridReact } from 'ag-grid-react';
108
import { ColDef, CsvExportParams } from 'ag-grid-community';
119
import { GsLang } from '../../utils';
1210

1311
export type CsvDownloadProps = {
14-
gridRef: RefObject<AgGridReact>;
1512
columns: ColDef[];
1613
tableName: string;
1714
tableNamePrefix?: string;

0 commit comments

Comments
 (0)