Replies: 1 comment
-
your exporter code should be called inside the context |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm currently struggling on an issue while trying to export my react-data-grid table.
I've followed the example given on the demo website about the export utilities functions.
But they are not using react-redux in this example. Using react-redux give me an issue on my custom header tab in my react-data-grid.
My Datagrid looks like that:
<StyledDataGrid enableVirtualization={false} theme={theme} onPaste={handlePaste} headerRowHeight={100} isVisible={tabSelectedConfig?.visibility} columns={columns} rows={filteredRows} onRowsChange={handleRowsChange} sortColumns={sortColumns} onSortColumnsChange={setSortColumns} defaultColumnOptions={{ sortable: true, resizable: true, filterable: true, }} />
And to build my columns I'm using these kind of config:
{ key: "groupe_attached", name: "Groupe", type: "text", admin: true, resizable: true, width: 120, cellClass(row) { return StyledAdminDiv; }, formatter: ({ column, row }) => ( <TextFormatter column={column} row={row} /> ), headerRenderer: (p) => ( <TextHeaderWithFilterContainer columnType="text" columnName={p.column.name} columnKey={p.column.key} /> ), },
But as you can see in the previous config, the headerrenderer is calling a container. And it's trying to access to the store through the context. And it's generating an error.
Unhandled Rejection (Error): Could not find "store" in the context of "Connect(TextHeaderWithFilter)". Either wrap the root component in a , or pass a custom React context provider to and the corresponding React context consumer to Connect(TextHeaderWithFilter) in connect options.
If someone could help me on that 🙏
Thanks a lot by advance
Beta Was this translation helpful? Give feedback.
All reactions