king
2021-06-24 95afd40fc2741ac0ce59c2091f6cfce1f98877d4
src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx
@@ -171,8 +171,9 @@
  }
  handleDelete = key => {
    const dataSource = [...this.state.dataSource]
    this.setState({ dataSource: dataSource.filter(item => item.key !== key) })
    const dataSource = this.state.dataSource.filter(item => item.key !== key)
    this.setState({ dataSource })
    this.props.onChange && this.props.onChange(dataSource)
  }
  handleAdd = () => {
@@ -185,10 +186,12 @@
    if (type === 'link') {
      newData.ParentID = `${count}`
    }
    let data = [...dataSource, newData]
    this.setState({
      dataSource: [...dataSource, newData],
      dataSource: data,
      count: count + 1
    })
    this.props.onChange && this.props.onChange(data)
  }
  handleSave = row => {
@@ -200,6 +203,7 @@
      ...row
    })
    this.setState({ dataSource: newData })
    this.props.onChange && this.props.onChange(newData)
  }
  resetColumn = (type) => {