Skip to content

Commit

Permalink
Merge pull request #580 from aj019/clear_filter
Browse files Browse the repository at this point in the history
Fix: clear filter button does not work #578
  • Loading branch information
ngokevin committed Mar 8, 2019
2 parents b071eab + a2538ea commit 7ef563b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/scenegraph/SceneGraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export default class SceneGraph extends React.Component {

clearFilter = () => {
this.setState({ filter: '' });
this.updateFilteredEntities('');
};

renderEntities = () => {
Expand Down Expand Up @@ -288,6 +289,7 @@ export default class SceneGraph extends React.Component {
placeholder="Search..."
onChange={this.onChangeFilter}
onKeyUp={this.onFilterKeyUp}
value={this.state.filter}
/>
{clearFilter}
{!this.state.filter && <span className="fa fa-search" />}
Expand Down

0 comments on commit 7ef563b

Please sign in to comment.