mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
Update README, overlayFactory example (#997)
Update example of usage `overlayFactory` according to "react-loading-overlay" documentation.
This commit is contained in:
parent
5e8bb3426a
commit
46258b0264
@ -98,7 +98,14 @@ import overlayFactory from 'react-bootstrap-table2-overlay';
|
||||
Actually, `react-bootstrap-table-overlay` is depends on [`react-loading-overlay`](https://github.com/derrickpelletier/react-loading-overlay) and `overlayFactory` just a factory function and you can pass any props which available for `react-loading-overlay`:
|
||||
|
||||
```js
|
||||
overlay={ overlayFactory({ spinner: true, background: 'rgba(192,192,192,0.3)' }) }
|
||||
overlay={
|
||||
overlayFactory({
|
||||
spinner: true,
|
||||
styles: {
|
||||
overlay: (base) => ({...base, background: 'rgba(255, 0, 0, 0.5)'})
|
||||
}
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
### <a name='caption'>caption - [String | Node]</a>
|
||||
@ -334,4 +341,4 @@ handleDataChange = ({ dataSize }) => {
|
||||
onDataSizeChange={ handleDataChange }
|
||||
....
|
||||
/>
|
||||
```
|
||||
```
|
||||
|
||||
@ -36,7 +36,7 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
||||
columns={ columns }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
overlay={ overlayFactory({ spinner: true, background: 'rgba(192,192,192,0.3)' }) }
|
||||
overlay={ overlayFactory({ spinner: true, styles: { overlay: (base) => ({...base, background: 'rgba(255, 0, 0, 0.5)'}) } }) }
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
@ -101,7 +101,12 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
||||
columns={ columns }
|
||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||
onTableChange={ onTableChange }
|
||||
overlay={ overlayFactory({ spinner: true, background: 'rgba(192,192,192,0.3)' }) }
|
||||
overlay={
|
||||
overlayFactory({
|
||||
spinner: true,
|
||||
styles: { overlay: base => ({ ...base, background: 'rgba(255, 0, 0, 0.5)' }) }
|
||||
})
|
||||
}
|
||||
/>
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user