Skip to content

Commit 77a1ede

Browse files
author
vikasrohit
authored
Merge pull request #546 from appirio-tech/feature/github_issue_543_keyword_search
Github issue #543, Change project name search to project keyword search
2 parents e8a682f + c800941 commit 77a1ede

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/components/TopBar/TopBar.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class TopBar extends Component {
3232
}
3333
/*eslint-enable */
3434

35-
handleSearch(name) {
36-
this.props.applyFilters({ name })
35+
handleSearch(keyword) {
36+
this.props.applyFilters({ keyword })
3737
}
3838

3939
handleMyProjectsFilter(event) {
@@ -107,7 +107,7 @@ class TopBar extends Component {
107107
<SearchBar
108108
hideSuggestionsWhenEmpty
109109
showPopularSearchHeader={ false }
110-
searchTermKey="name"
110+
searchTermKey="keyword"
111111
onTermChange={ this.handleTermChange }
112112
onSearch={ this.handleSearch }
113113
onClearSearch={ this.handleSearch }

src/components/TopBar/TopBarContainer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ class TopBarContainer extends React.Component {
7878

7979
applyFilters(filter) {
8080
const criteria = _.assign({}, this.props.criteria, filter)
81-
if (criteria && criteria.name)
82-
criteria.name = encodeURIComponent(criteria.name)
81+
if (criteria && criteria.keyword)
82+
criteria.keyword = encodeURIComponent(criteria.keyword)
8383
this.routeWithParams(criteria, 1)
8484
}
8585

src/projects/list/components/Projects/Projects.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Projects extends Component {
2424
if (!_.isEmpty(queryParams)) {
2525
const initialCriteria = {}
2626
if (queryParams.sort) initialCriteria.sort = queryParams.sort
27-
if (queryParams.name) initialCriteria.name = decodeURIComponent(queryParams.name)
27+
if (queryParams.keyword) initialCriteria.keyword = decodeURIComponent(queryParams.keyword)
2828
if (queryParams.status) initialCriteria.status = queryParams.status
2929
if (queryParams.type) initialCriteria.type = queryParams.type
3030
if (queryParams.memberOnly) initialCriteria.memberOnly = queryParams.memberOnly

0 commit comments

Comments
 (0)