Description
I was wondering if there is an issue of combining the ToolkitProvider with the overlay for spinners, or if I am simply missing something in my code? Once I enable the ToolkitProvider the overlay is not showing anything anymore.
I have set up a table with a spinner overlay according to the documentation, more or less like this:
<BootstrapTable
data={store.dataSource}
columns={columns}
keyField={keyField}
loading={store.loading}
overlay={overlayFactory({
spinner: true,
background: 'rgba(192,192,192,0.3)'
})}
_...some more properties..._
/>
Up to this point everything works fine. However, as soon as I wrap the table in the ToolkitProvider (which I will need later for some other functionality) the spinner does not show anymore. This his how it looks afterwards:
<ToolkitProvider
data={store.dataSource}
columns={columns}
keyField={keyField}
loading={store.loading}
>
{(props) => (
<BootstrapTable
{...props.baseProps}
overlay={overlayFactory({
spinner: true,
background: 'rgba(192,192,192,0.3)'
})}
_...some more properties..._
/>
)}
</ToolkitProvider>
It also makes no difference if I move the overlay property also to the ToolkitProvider and pass it on via the ...props.baseProps
.
I did not change any of the functionality regarding data loading. Simply wrapping the component makes the overlay not working anymore, as if it were not present at all.
These are the versions I am using:
"react-bootstrap-table-next": "^2.0.1",
"react-bootstrap-table2-editor": "^1.2.2",
"react-bootstrap-table2-filter": "^1.1.1",
"react-bootstrap-table2-overlay": "^1.0.0",
"react-bootstrap-table2-paginator": "^2.0.1",
"react-bootstrap-table2-toolkit": "^1.1.2",
Am I missing something?