From 592ff0aa0f2d45d143872b672a1468e268d3157f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 22 二月 2020 17:25:20 +0800
Subject: [PATCH] 2020-02-22

---
 src/templates/tableshare/editable/index.jsx |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/templates/tableshare/editable/index.jsx b/src/templates/tableshare/editable/index.jsx
index 4f10603..40a23f8 100644
--- a/src/templates/tableshare/editable/index.jsx
+++ b/src/templates/tableshare/editable/index.jsx
@@ -1,4 +1,5 @@
 import React, {Component} from 'react'
+import { is, fromJS } from 'immutable'
 import { Table, Input, Button, Popconfirm, Form, Icon } from 'antd'
 import Utils from '@/utils/utils.js'
 import './index.scss'
@@ -211,6 +212,11 @@
   UNSAFE_componentWillReceiveProps (nextProps) {
     if (this.props.type !== nextProps.type) {
       this.resetColumn(nextProps.type)
+    } else if (!is(fromJS(this.props.data), fromJS(nextProps.data))) {
+      this.setState({
+        dataSource: nextProps.data,
+        count: nextProps.data.length
+      })
     }
   }
 

--
Gitblit v1.8.0