fix(xo-web/home): always sort by name_label as a secondary sort (#4047)

Fixes #3983
This commit is contained in:
Pierre Donias 2019-03-20 09:43:06 +01:00 committed by GitHub
parent 558083a916
commit b71f4f6800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,8 @@
### Bug fixes
- [Home] Always sort the items by their names as a secondary sort criteria [#3983](https://github.com/vatesfr/xen-orchestra/issues/3983) (PR [#4047](https://github.com/vatesfr/xen-orchestra/pull/4047))
### Released packages
- xo-server v5.38.0

View File

@ -674,7 +674,10 @@ export default class Home extends Component {
_getFilteredItems = createSort(
createFilter(() => this.props.items, this._getFilterFunction),
() => this.state.sortBy,
createSelector(
() => this.state.sortBy,
sortBy => [sortBy, 'name_label']
),
() => this.state.sortOrder
)