Commit 72f1d29d authored by hh1966's avatar hh1966
Browse files

Fix ResearchPlanDetailsFieldTableColumnNameModal

parent 56347288
......@@ -7,14 +7,28 @@ class ResearchPlanDetailsFieldTableColumnNameModal extends Component {
constructor(props) {
super(props);
const { columnName } = this.props
this.state = {
columnNameValue: columnName ? columnName : '',
columnNameValue: '',
columnNameError: ''
}
}
componentDidUpdate(prevProps) {
if (this.props != prevProps) {
const { modal, columns } = this.props
let columnNameValue = ''
if (modal.action == 'rename') {
columnNameValue = columns[modal.idx].name
}
this.setState({
columnNameValue: columnNameValue,
columnNameError: ''
})
}
}
handleColumnNameChange(event) {
this.setState({ columnNameValue: event.target.value });
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment