Skip to content

Commit

Permalink
Add event to clear filters on example
Browse files Browse the repository at this point in the history
  • Loading branch information
diegomurakami committed Jul 22, 2016
1 parent 8b84865 commit 45238df
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/scripts/example22-custom-filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ var Example = React.createClass({
return values.filter((item, i, a) => { return i == a.indexOf(item); });
},
handleOnClearFilters() {
this.setState({ filters: {} });
},
render:function(){
return(
<ReactDataGrid
Expand All @@ -115,6 +119,7 @@ var Example = React.createClass({
toolbar={<Toolbar enableFilter={true}/>}
onAddFilter={this.handleFilterChange}
getValidFilterValues={this.getValidFilterValues}
onClearFilters={this.handleOnClearFilters}
/>
);
}
Expand Down

0 comments on commit 45238df

Please sign in to comment.