MCPcopy Create free account
hub / github.com/ElemeFE/element-react / componentDidUpdate

Method componentDidUpdate

src/table/TableLayout.jsx:57–81  ·  view source on GitHub ↗
(preProps: TableLayoutProps)

Source from the content-addressed store, hash-verified

55 }
56
57 componentDidUpdate(preProps: TableLayoutProps) {
58 if (
59 this.isPropChanged('columns', preProps)
60 || this.isPropChanged('style', preProps)
61 || this.isPropChanged('className', preProps)
62 ) {
63 this.scheduleLayout();
64 return;
65 }
66
67 const shouldUpdateHeight = [
68 'height',
69 'maxHeight',
70 'data',
71 'store.expandingRows',
72 'expandRowKeys',
73 'showSummary',
74 'summaryMethod',
75 'sumText',
76 ].some(key => this.isPropChanged(key, preProps));
77 if (shouldUpdateHeight) {
78 this.updateHeight();
79 this.updateScrollY();
80 }
81 }
82
83 componentWillUnmount() {
84 removeResizeListener(this.el, this.resizeListener)

Callers

nothing calls this directly

Calls 4

isPropChangedMethod · 0.95
scheduleLayoutMethod · 0.95
updateHeightMethod · 0.95
updateScrollYMethod · 0.95

Tested by

no test coverage detected