-
Notifications
You must be signed in to change notification settings - Fork 431
Description
Hi @AllenFang,
I am using Grid in two tabs in same page. I have created one component for grid where i am passing properties based on props
`let gridAdditionalOptions = {
cellEdit: cellEditFactory(cellEdit),
defaultSorted: defaultSort,
expandRow: expandRow,
...(Object.entries(selectRow).length !== 0 && {selectRow: selectRow})
};
gridAdditionalOptions = this.getPaginationSettings(
gridAdditionalOptions,
settings
);
return (
<div className={headerClass}>
<BootstrapTable
keyField="id"
data={tableData}
columns={tableColumns}
rowClasses = 'custom-row-class'
{...gridAdditionalOptions}
/>
</div>
);`
Now in first tab, i want to use selectRow but in second tab grid i dont need selection functionality
So It is working fine in first tab, but when click on second tab it is throwing error in selectionProvider
Uncaught TypeError: Cannot read property 'selected' of undefined
at new SelectionProvider (selection-context.js:188)
at constructClassInstance (react-dom.development.js:11739)
at updateClassComponent (react-dom.development.js:15066)
at beginWork (react-dom.development.js:16066)
at performUnitOfWork (react-dom.development.js:20086)
at workLoop (react-dom.development.js:20127)
at renderRoot (react-dom.development.js:20207)
at performWorkOnRoot (react-dom.development.js:21164)
at performWork (react-dom.development.js:21074)
at performSyncWork (react-dom.development.js:21048)
at interactiveUpdates$1 (react-dom.development.js:21333)
at interactiveUpdates (react-dom.development.js:2268)
at dispatchInteractiveEvent (react-dom.development.js:5086)
Please check what is missing