componentDidUpdate()

in src/routes/Plugin/PluginRuleHandle/ParamPluginRuleHandle.js [93:111]


  componentDidUpdate() {
    const {onChange, value} = this.props;
    const data = {};
    const currentData = this.getCurrentData();
    const valueStr = JSON.stringify(currentData);
    // console.log(currentData);
    if (value !== undefined) {
      try {
        Object.assign(data, JSON.parse(value));
      } catch (e) {
        // eslint-disable-next-line no-console
        console.error(e)
      }
    }

    if (valueStr !== value && onChange) {
      onChange(valueStr);
    }
  }