fix(xo-web/SortedTable): don't inject empty filter if there isn't a URL param (#4994)

This commit is contained in:
Pierre Donias 2020-05-14 11:11:05 +02:00 committed by GitHub
parent f9886d52da
commit 5d0a308d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -18,6 +18,7 @@
- Fix mounting of NFS remote in FreeBSD (PR [#4988](https://github.com/vatesfr/xen-orchestra/issues/4988))
- [Remotes] Fix "remote is disabled" error on getting the remotes info (commit [eb2f429964d7adc264bf678c37e49a856454388e](https://github.com/vatesfr/xen-orchestra/commit/eb2f429964d7adc264bf678c37e49a856454388e))
- Fix default filters not being set in all tables (PR [#4994](https://github.com/vatesfr/xen-orchestra/pull/4994))
### Released packages

View File

@ -633,7 +633,10 @@ class SortedTable extends Component {
_getParsedQueryString = createSelector(
() => this.props.router.location.query[this.props.stateUrlParam],
(urlState = '') => {
urlState => {
if (urlState === undefined) {
return {}
}
const [, page, selectedColumnId, sortOrder, filter] =
URL_STATE_RE.exec(urlState) || []
return {