Skip to content

Commit ed80df3

Browse files
committed
perf: update table
1 parent 91e0249 commit ed80df3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

components/vc-table/src/Table.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,16 @@ export default {
179179
},
180180

181181
updated (prevProps) {
182-
if (this.columnManager.isAnyColumnsFixed()) {
183-
this.handleWindowResize()
184-
if (!this.resizeEvent) {
185-
this.resizeEvent = addEventListener(
186-
window, 'resize', this.debouncedWindowResize
187-
)
182+
this.$nextTick(() => {
183+
if (this.columnManager.isAnyColumnsFixed()) {
184+
this.handleWindowResize()
185+
if (!this.resizeEvent) {
186+
this.resizeEvent = addEventListener(
187+
window, 'resize', this.debouncedWindowResize
188+
)
189+
}
188190
}
189-
}
191+
})
190192
},
191193

192194
beforeDestroy () {

0 commit comments

Comments
 (0)