`I am using ag-grid Export in React js as below.
import { CsvExportModule } from "@ag-grid-community/csv-export"; const modules = [ ClientSideRowModelModule, ColumnsToolPanelModule, FiltersToolPanelModule, // ServerSideRowModelModule, CsvExportModule, ]; ModuleRegistry.registerModules(modules);
While trying to export as csv, I’m getting error react-dom.development.js:4091 Uncaught TypeError: Cannot read properties of null (reading ‘get’)
I tried debugging, and reached this function :-
isExportSuppressed() { return this.gos.get("suppressCsvExport"); }
Here, this.gos is always coming as undefined which is the reason for my error.
I tried debugging for this.gos, but not understanding what is it. It is assigned in constructor function as
constructor(config) { this.groupColumns = []; const {columnModel, valueService, gos, processCellCallback, processHeaderCallback, processGroupHeaderCallback, processRowGroupCallback} = config; this.gos = gos; }
`