Skip to content

Commit b840167

Browse files
authored
Merge pull request #282 from sadathanwar17/Project_Tags_Search
[#1453] Fix Project tags must be clickable and used as search term
2 parents 8b8c38c + 09cef26 commit b840167

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/SearchBar/SearchBar.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ class SearchBar extends Component {
4141
window.removeEventListener('click', this.handleOutsideClick)
4242
}
4343

44+
componentWillReceiveProps(nextProps,nextState) {
45+
const searchVal = this.getQueryStringValue(nextProps.searchTermKey)
46+
if (searchVal !== this.state.searchValue) {
47+
this.setState({ searchState: 'filled', searchValue: searchVal })
48+
}
49+
}
50+
4451
handleOutsideClick(evt) {
4552
let t = evt.target
4653
let i = 0

0 commit comments

Comments
 (0)