Skip to content

Commit 0afb425

Browse files
#152 Fix Mech button active after deleting section
1 parent 639bd05 commit 0afb425

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

webapp/components/definition/cellRules/NetPyNECellRules.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ export default class NetPyNECellRules extends React.Component {
643643
selected={sectionName == selectedSection}
644644
paramPath={[selectedCellRule]}
645645
handleClick={this.selectSection}
646+
onDelete={() => this.setState({ selectedSection: undefined })}
646647
/>)
647648

648649
} else if (page == "mechanisms" && Object.keys(model).length > 0 && model[selectedCellRule] && model[selectedCellRule].secs[selectedSection]) {

webapp/components/general/NetPyNEThumbnail.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default class NetPyNEThumbnail extends React.Component {
4242
if (this.props.handleClick && actionConfirmed) {
4343
// this.props.deleteMethod(this.props.name);
4444
this.props.deleteNetParamsObj({ paramPath: this.props.paramPath, paramName: this.props.name })
45+
this.props.onDelete && this.props.onDelete()
4546
}
4647
this.setState({ dialogOpen: false });
4748
}

0 commit comments

Comments
 (0)