king
2020-11-12 7facbed508592e842f9bca085cf0ffaebcbfc571
src/tabviews/custom/components/card/table-card/index.jsx
@@ -34,7 +34,7 @@
  }
  UNSAFE_componentWillMount () {
    const { data } = this.props
    const { data, initdata } = this.props
    let _config = fromJS(this.props.config).toJS()
    let _cols = new Map()
@@ -43,6 +43,9 @@
    if (_config.setting.sync === 'true' && data) {
      _data = data[_config.dataName] || []
      _sync = false
    } else if (_config.setting.sync === 'true' && initdata) {
      _data = initdata || []
      _sync = false
    }
@@ -80,10 +83,6 @@
    }, () => {
      if (_config.setting.sync !== 'true' && _config.setting.onload === 'true') {
        this.loadData()
      } else if (_sync && !_data) {
        this.setState({
          loading: true
        })
      }
    })
  }
@@ -115,7 +114,7 @@
        _data = nextProps.data[config.dataName] || []
      }
      this.setState({sync: false, loading: false, data: _data})
      this.setState({sync: false, data: _data})
    } else if (!is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
      if (config.setting.syncRefresh === 'true') {
        this.setState({}, () => {