| | |
| | | if (!is(fromJS(this.state.columns), fromJS(nextProps.config.cols))) { |
| | | let _columns = fromJS(nextProps.config.cols).toJS() |
| | | this.setState({columns: _columns}) |
| | | if (_columns[_columns.length - 1] && _columns[_columns.length - 1].focus) { |
| | | this.editColumn(_columns[_columns.length - 1]) |
| | | |
| | | let lastcol = _columns.slice(-1)[0] |
| | | if (lastcol && lastcol.focus) { |
| | | this.editColumn(lastcol) |
| | | } |
| | | } else if (!is(fromJS(this.state.fields), fromJS(nextProps.config.columns))) { |
| | | this.setState({fields: fromJS(nextProps.config.columns).toJS()}) |
| | |
| | | <DndProvider> |
| | | <Table |
| | | rowKey="uuid" |
| | | bordered={config.wrap.border !== 'false'} |
| | | bordered={config.wrap.bordered !== 'false'} |
| | | components={components} |
| | | dataSource={this.state.data} |
| | | rowSelection={config.wrap.tableType ? { type: 'radio' } : null} |