From 753ac5f57b10588e225c1d82203b13a81bc9c9a7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 03 十二月 2020 18:36:26 +0800
Subject: [PATCH] 2020-12-03

---
 src/menu/components/table/normal-table/columns/index.jsx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/menu/components/table/normal-table/columns/index.jsx b/src/menu/components/table/normal-table/columns/index.jsx
index 70b2e48..20b75e5 100644
--- a/src/menu/components/table/normal-table/columns/index.jsx
+++ b/src/menu/components/table/normal-table/columns/index.jsx
@@ -182,8 +182,10 @@
     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()})
@@ -395,7 +397,7 @@
         <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}

--
Gitblit v1.8.0