mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
patch docs for clear search button
This commit is contained in:
parent
029cd3ab6f
commit
f1b39e3dd6
@ -118,7 +118,7 @@ Remember to install [`react-bootstrap-table2-paginator`](https://www.npmjs.com/p
|
||||
|
||||
- [x] Custom search component and position
|
||||
- [x] Custom search value
|
||||
- [ ] Clear search
|
||||
- [x] Clear search
|
||||
- [ ] Multiple search
|
||||
- [ ] Strict search
|
||||
|
||||
|
||||
@ -95,8 +95,34 @@ If you want to search on the formatted data, you are supposed to enable this pro
|
||||
</ToolkitProvider>
|
||||
```
|
||||
|
||||
### Clear Search Button
|
||||
We have a built-in clear search function which allow user clear search status via clicking button:
|
||||
|
||||
```js
|
||||
import ToolkitProvider, { Search } from 'react-bootstrap-table2-toolkit';
|
||||
|
||||
const { SearchBar, ClearSearchButton } = Search;
|
||||
|
||||
<ToolkitProvider
|
||||
keyField="id"
|
||||
data={ products }
|
||||
columns={ columns }
|
||||
search
|
||||
>
|
||||
{
|
||||
props => (
|
||||
<div>
|
||||
<SearchBar { ...props.searchProps } />
|
||||
<ClearSearchButton { ...props.searchProps } />
|
||||
....
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</ToolkitProvider>
|
||||
```
|
||||
|
||||
## Export CSV
|
||||
There are two step to enable the export CSV functionality:
|
||||
There are two steps to enable the export CSV functionality:
|
||||
|
||||
1. Give `exportCSV` prop as `true` on `ToolkitProvider`.
|
||||
2. Render `ExportCSVButton` with `csvProps`. The position of `ExportCSVButton` is depends on you.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user