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`:
|
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
|
```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>
|
### <a name='caption'>caption - [String | Node]</a>
|
||||||
@ -334,4 +341,4 @@ handleDataChange = ({ dataSize }) => {
|
|||||||
onDataSizeChange={ handleDataChange }
|
onDataSizeChange={ handleDataChange }
|
||||||
....
|
....
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|||||||
@ -36,7 +36,7 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
|||||||
columns={ columns }
|
columns={ columns }
|
||||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||||
onTableChange={ onTableChange }
|
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>
|
<Code>{ sourceCode }</Code>
|
||||||
</div>
|
</div>
|
||||||
@ -101,7 +101,12 @@ const RemotePagination = ({ loading, data, page, sizePerPage, onTableChange, tot
|
|||||||
columns={ columns }
|
columns={ columns }
|
||||||
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
pagination={ paginationFactory({ page, sizePerPage, totalSize }) }
|
||||||
onTableChange={ onTableChange }
|
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>
|
<Code>{ sourceCode }</Code>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user