From a85277ea82da737a7f4187fef0eb9b843597d864 Mon Sep 17 00:00:00 2001 From: zuiidea Date: Mon, 27 Mar 2017 15:09:36 +0800 Subject: [PATCH] adjust components DataTable --- src/components/DataTable/DataTable.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/DataTable/DataTable.js b/src/components/DataTable/DataTable.js index 542080b..9a15473 100644 --- a/src/components/DataTable/DataTable.js +++ b/src/components/DataTable/DataTable.js @@ -66,6 +66,9 @@ class DataTable extends React.Component { ...fetchData, }, }).then((result) => { + if (!this.refs.DataTable) { + return + } const { pagination } = this.state pagination.total = result.total || pagination.total this.setState({ @@ -81,6 +84,7 @@ class DataTable extends React.Component { const { loading, dataSource, pagination } = this.state return (