Skip to content

Commit

Permalink
fix error dialog not closing
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelpiano committed Jul 9, 2024
1 parent c9a9744 commit 038e4d1
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions webapp/components/definition/populations/NetPyNEPopulation.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class NetPyNEPopulation extends React.Component {
model: undefined,
};

this.resetError = this.resetError.bind(this);
this.updateModel();
}

Expand Down Expand Up @@ -558,6 +559,15 @@ netpyne_geppetto.netParams.popParams['${this.props.name}']['pulses'].pop(${index
);
}

resetError () {
this.setState({
errorMessage: undefined,
errorDetails: undefined,
}, () => {
this.props.updateCards();
});
}

render () {
const { classes } = this.props;

Expand All @@ -575,10 +585,7 @@ netpyne_geppetto.netParams.popParams['${this.props.name}']['pulses'].pop(${index
<Button
variant="contained"
color="primary"
onClick={() => this.setState({
errorMessage: undefined,
errorDetails: undefined,
})}
onClick={this.resetError}
>
BACK
</Button>
Expand Down

0 comments on commit 038e4d1

Please sign in to comment.