【发布时间】:2019-12-23 22:14:52
【问题描述】:
是否有任何返回过滤行的全局表选项?忽略分页。所有行匹配一个或多个textFilter?
我需要在标题中显示过滤数据的平均值的值。
我在 https://react-bootstrap-table.github.io/react-bootstrap-table2/docs/table-props.html 上找不到任何东西
有onDataSizeChange,但它只提供dataSize(行数),也只在不使用分页时可用。
更新到 cmets 中的第二个问题:
class App extends Component<IProps, IState> {
constructor(props: IProps) {
super(props);
this.state = {
data: [...]
filtredData: null
};
};
const factory = patchFilterFactory(filterFactory, (filteredData) => {
this.setState({filteredData}); // causes maximum update exceeded..
});
render() {
return (
<div>
<BootstrapTable
keyField='id'
striped
hover
bootstrap4
data={anbuds}
filter={factory()}
columns={columns}/>
</div>
);
}
}
【问题讨论】:
标签: reactjs react-bootstrap-table