Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.

Commit f4fd325

Browse files
committed
Add functionality that clears fuzzy search results
1 parent daf6d84 commit f4fd325

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/scenes/home/codeSchools/stateSortedSchools/stateSortedSchools.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class StateSortedSchools extends Component {
2727
// Prevent query with just one character in search field
2828
this.setState({ query: value });
2929
this.setState({ schoolsByState: this.searchState(value) });
30+
} else {
31+
// Clear results when search field is 1 char or blank
32+
this.setState({ query: null });
33+
this.setState({ schoolsByState: null });
3034
}
3135
}
3236

0 commit comments

Comments
 (0)