Skip to content

Commit c9c3ae7

Browse files
committed
fixed collection filter due to internal input component adjustments
1 parent 21fbe0a commit c9c3ae7

File tree

1 file changed

+4
-3
lines changed
  • lib/matestack/ui/vue_js/components/collection

1 file changed

+4
-3
lines changed

lib/matestack/ui/vue_js/components/collection/filter.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ const componentDef = {
1111
var url;
1212
var filter = this.data
1313
for (var key in this.data) {
14-
url = queryParamsHelper.updateQueryParams(this.props["id"] + "-filter-" + key, JSON.stringify(this.data[key]), url)
14+
if(this.data[key] != null){
15+
url = queryParamsHelper.updateQueryParams(this.props["id"] + "-filter-" + key, JSON.stringify(this.data[key]), url)
16+
}
1517
}
1618
url = queryParamsHelper.updateQueryParams(this.props["id"] + "-offset", 0, url)
1719
window.history.pushState({matestackApp: true, url: url}, null, url);
@@ -22,7 +24,6 @@ const componentDef = {
2224
for (var key in this.data) {
2325
url = queryParamsHelper.updateQueryParams(this.props["id"] + "-filter-" + key, null, url)
2426
this.data[key] = null;
25-
this.$forceUpdate();
2627
}
2728
this.initValues();
2829
window.history.pushState({matestackApp: true, url: url}, null, url);
@@ -34,7 +35,7 @@ const componentDef = {
3435
var queryParamsObject = queryParamsHelper.queryParamsToObject()
3536
Object.keys(queryParamsObject).forEach(function(key){
3637
if (key.startsWith(self.props["id"] + "-filter-")){
37-
self.data[key.replace(self.props["id"] + "-filter-", "")] = queryParamsObject[key]
38+
self.data[key.replace(self.props["id"] + "-filter-", "")] = JSON.parse(queryParamsObject[key])
3839
}
3940
})
4041
}

0 commit comments

Comments
 (0)