Skip to content

Commit dd0466b

Browse files
committed
#573 fix: Fix not opening SyncMechParams
1 parent 5fbe78f commit dd0466b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

webapp/components/definition/synapses/NetPyNESynapse.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ class NetPyNESynapse extends React.Component {
3030

3131
UNSAFE_componentWillReceiveProps (nextProps) {
3232
if (this.state.currentName != nextProps.name) {
33-
this.setState({ currentName: nextProps.name, synMechMod: '' });
33+
this.setSyncMechModState(nextProps.name)
34+
this.setState({ currentName: nextProps.name});
3435
}
3536
}
3637

@@ -115,6 +116,15 @@ class NetPyNESynapse extends React.Component {
115116
this.setState({ synMechMod: value });
116117
}
117118

119+
async setSyncMechModState(synapseName) {
120+
const value = await Utils.execPythonMessage(
121+
`netpyne_geppetto.netParams.synMechParams['${
122+
synapseName
123+
}']['mod']`
124+
)
125+
this.setState({synMechMod: value})
126+
}
127+
118128
render () {
119129
const { classes } = this.props;
120130
const dialogPop = this.state.errorMessage != undefined ? (

0 commit comments

Comments
 (0)