Fix duplicate AJAX call on using Apply or Clear buttons in group filter
Fixes https://github.com/octobercms/october/issues/5365
This commit is contained in:
parent
825ca91de9
commit
89dbe8dc72
|
|
@ -156,7 +156,7 @@
|
|||
|
||||
$(event.relatedTarget).on('input', '#controlFilterPopover input[data-search]', function (e) {
|
||||
self.searchQuery($(this))
|
||||
});
|
||||
})
|
||||
})
|
||||
|
||||
// Setup event handler to apply selected options when closing the type: group scope popup
|
||||
|
|
@ -176,7 +176,7 @@
|
|||
*/
|
||||
FilterWidget.prototype.bindDependants = function() {
|
||||
if (!$('[data-scope-depends]', this.$el).length) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
var self = this,
|
||||
|
|
@ -399,8 +399,8 @@
|
|||
if (!data.active) data.active = []
|
||||
if (!data.available) data.available = []
|
||||
|
||||
this.scopeValues[scopeName] = data.active;
|
||||
this.scopeAvailable[scopeName] = data.available;
|
||||
this.scopeValues[scopeName] = data.active
|
||||
this.scopeAvailable[scopeName] = data.available
|
||||
|
||||
// Do not render if scope has changed
|
||||
if (scopeName != this.activeScopeName)
|
||||
|
|
@ -552,11 +552,12 @@
|
|||
if (isReset) {
|
||||
this.scopeValues[scopeName] = null
|
||||
this.scopeAvailable[scopeName] = null
|
||||
this.isActiveScopeDirty = true
|
||||
this.updateScopeSetting(this.$activeScope, 0)
|
||||
}
|
||||
|
||||
this.pushOptions(scopeName);
|
||||
this.isActiveScopeDirty = true;
|
||||
this.pushOptions(scopeName)
|
||||
this.isActiveScopeDirty = false
|
||||
this.$activeScope.data('oc.popover').hide()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue