Skip to content

Commit

Permalink
Refactor #4953 - For ColumnFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 2, 2024
1 parent 11a22a2 commit d4e825b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion components/lib/datatable/ColumnFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,11 +279,17 @@ export default {
},
data() {
return {
id: this.$attrs.id,
overlayVisible: false,
defaultMatchMode: null,
defaultOperator: null
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
overlay: null,
selfClick: false,
overlayEventListener: null,
Expand All @@ -299,6 +305,8 @@ export default {
}
},
mounted() {
this.id = this.id || UniqueComponentId();
if (this.filters && this.filters[this.field]) {
let fieldFilters = this.filters[this.field];
Expand Down Expand Up @@ -620,7 +628,7 @@ export default {
return this.showMenu && (this.display === 'row' ? this.type !== 'boolean' : true);
},
overlayId() {
return UniqueComponentId();
return this.id + '_overlay';
},
matchModes() {
return (
Expand Down

0 comments on commit d4e825b

Please sign in to comment.