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

Method constructor

src/table/TableLayout.jsx:20–38  ·  view source on GitHub ↗
(props: TableLayoutProps)

Source from the content-addressed store, hash-verified

18 };
19
20 constructor(props: TableLayoutProps) {
21 super(props);
22 this.state = {
23 height: props.height || props.maxHeight || null, // Table's height or maxHeight prop
24 gutterWidth: getScrollBarWidth(), // scrollBar width
25 tableHeight: null, // Table's real height
26 headerHeight: null, // header's height of Table
27 bodyHeight: null, // body's height of Table
28 footerHeight: null, // footer's height of Table
29 fixedBodyHeight: null, // fixed body's height of Table
30 viewportHeight: null, // Table's real height without y scroll bar height
31 scrollX: null, // has x scroll bar
32 scrollY: null, // has y scroll bar
33 };
34
35 this.resizeListener = throttle(50, () => {
36 this.scheduleLayout();
37 });
38 }
39
40 componentDidMount() {
41 this.el = this.table.el;

Callers

nothing calls this directly

Calls 2

scheduleLayoutMethod · 0.95
getScrollBarWidthFunction · 0.90

Tested by

no test coverage detected