Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Commit

Permalink
fix(general-row): call resize handler on mounted (#1093)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliodialpad authored Jul 24, 2023
1 parent 79ed9b5 commit 25791d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/leftbar/general_row/general_row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ export default {
mounted () {
this.resizeObserver = new ResizeObserver(this.handleResize);
this.resizeObserver.observe(this.$el);
this.handleResize();
},
beforeDestroy: function () {
Expand All @@ -393,7 +394,7 @@ export default {
}
},
async handleResize () {
handleResize () {
const labelWidth = this.$el?.querySelector('.dt-leftbar-row__primary')?.clientWidth || 0;
const omegaWidth = this.$el?.querySelector('.dt-leftbar-row__omega')?.clientWidth || 0;
const alphaWidth = this.$el?.querySelector('.dt-leftbar-row__alpha')?.clientWidth || 0;
Expand Down

0 comments on commit 25791d7

Please sign in to comment.