Skip to content

Commit d92b317

Browse files
authored
Merge pull request #879 from appirio-tech/hotfix/project-list-sort-bestmatch
fixes #876
2 parents 01079dd + e9982bd commit d92b317

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/components/TopBar/TopBarContainer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,11 @@ class TopBarContainer extends React.Component {
7777

7878
applyFilters(filter) {
7979
const criteria = _.assign({}, this.props.criteria, filter)
80-
if (criteria && criteria.keyword)
80+
if (criteria && criteria.keyword) {
8181
criteria.keyword = encodeURIComponent(criteria.keyword)
82+
// force sort criteria to best match
83+
criteria.sort = 'best match'
84+
}
8285
this.routeWithParams(criteria, 1)
8386
}
8487

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Dropdown, DropdownItem } from 'appirio-tech-react-components'
55
const options = [
66
{ val: 'createdAt desc', label: 'Latest first' },
77
{ val: 'createdAt', label: 'Oldest first' },
8-
{ val: 'name', label: 'Name A-Z' }
9-
// { val: 'name desc', label: 'Name Z-A' }
8+
{ val: 'name', label: 'Name A-Z' },
9+
{ val: 'best match', label: 'Best Match' }
1010
]
1111

1212
const ProjectListProjectColHeader = ({currentSortField, sortHandler}) => {

0 commit comments

Comments
 (0)