Skip to content

Commit

Permalink
Refactor #4953 - For ScrollPanel
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Feb 2, 2024
1 parent 2b1b235 commit ae45937
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/lib/scrollpanel/ScrollPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,20 @@ export default {
outsideClickListener: null,
data() {
return {
id: UniqueComponentId(),
id: this.$attrs.id,
orientation: 'vertical',
lastScrollTop: 0,
lastScrollLeft: 0
};
},
watch: {
'$attrs.id': function (newValue) {
this.id = newValue || UniqueComponentId();
}
},
mounted() {
this.id = this.id || UniqueComponentId();
if (this.$el.offsetParent) {
this.initialize();
}
Expand Down Expand Up @@ -362,7 +369,7 @@ export default {
},
computed: {
contentId() {
return UniqueComponentId() + '_content';
return this.id + '_content';
}
}
};
Expand Down

0 comments on commit ae45937

Please sign in to comment.