From 038e4d104dc498a3079ba9e0157e2ad6e14a9882 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Tue, 9 Jul 2024 10:08:42 +0200 Subject: [PATCH] fix error dialog not closing --- .../definition/populations/NetPyNEPopulation.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/webapp/components/definition/populations/NetPyNEPopulation.js b/webapp/components/definition/populations/NetPyNEPopulation.js index e564b497..6de1fa73 100644 --- a/webapp/components/definition/populations/NetPyNEPopulation.js +++ b/webapp/components/definition/populations/NetPyNEPopulation.js @@ -59,6 +59,7 @@ class NetPyNEPopulation extends React.Component { model: undefined, }; + this.resetError = this.resetError.bind(this); this.updateModel(); } @@ -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; @@ -575,10 +585,7 @@ netpyne_geppetto.netParams.popParams['${this.props.name}']['pulses'].pop(${index