-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bind column filter onKeyUp to a dropdown menu click #165
Comments
@alisan617, you can use function afterColFilter(filterConds, result){ //do your stuff } var options = { afterColumnFilter: afterColFilter } <BootstrapTable data={data} options={options}> //.... You can check the docs |
My apology. My question wasn't clear enough. The goal is to have a dropdown menu, so that one doesn't have to type into the filter input text box to filter, but clicking a dropdown will filter the column. "afterColumnFilter" is tied to the keyup event of the input text box, which doesn't exist. Thanks Allen. |
Sorry my english is not very good ;( |
try this export default class FilterTable extends React.Component{
// handle dropdown on select
handleDropDownSelect(e){
// find name eq 123
this.refs.table.handleFilterData({
name: "123"
});
}
render(){
return (
<div>
// your dropdown....
// table as following
<BootstrapTable ref="table" data={products}>
<TableHeaderColumn dataField="id" isKey={true}>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField="name">Product Name</TableHeaderColumn>
<TableHeaderColumn dataField="price">Product Price</TableHeaderColumn>
</BootstrapTable>
</div>
);
}
}; |
That works. Thank you. |
Hi I am trying to add a custom filter with multiple selection like excel checkbox filter for table header, So I am using bootstrap dropdown menu for styling, but it is behind the table body I have tried the following code for header and body as well but it's not working Thanks in advance |
@hctslm, could you please open a new issue and I'll reply you. BTW, if a minimal and simple codes let me try it will be better :) |
Let's say I have a column with category data, I have a dropdown menu pre-populated with those category names. How do I bind the column filter input onKeyUp event with the dropdown menu click event?
The text was updated successfully, but these errors were encountered: