Refactor #4953 - For ColumnFilter

pull/5206/head
mertsincan 2024-02-02 15:46:56 +00:00
parent 11a22a2e0a
commit d4e825beeb
1 changed files with 9 additions and 1 deletions

View File

@ -279,11 +279,17 @@ export default {
}, },
data() { data() {
return { return {
id: this.$attrs.id,
overlayVisible: false, overlayVisible: false,
defaultMatchMode: null, defaultMatchMode: null,
defaultOperator: null defaultOperator: null
}; };
}, },
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
overlay: null, overlay: null,
selfClick: false, selfClick: false,
overlayEventListener: null, overlayEventListener: null,
@ -299,6 +305,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.id = this.id || UniqueComponentId();
if (this.filters && this.filters[this.field]) { if (this.filters && this.filters[this.field]) {
let fieldFilters = this.filters[this.field]; let fieldFilters = this.filters[this.field];
@ -620,7 +628,7 @@ export default {
return this.showMenu && (this.display === 'row' ? this.type !== 'boolean' : true); return this.showMenu && (this.display === 'row' ? this.type !== 'boolean' : true);
}, },
overlayId() { overlayId() {
return UniqueComponentId(); return this.id + '_overlay';
}, },
matchModes() { matchModes() {
return ( return (