summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/modals')
-rw-r--r--frontend/src/components/modals/Modal.js6
-rw-r--r--frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js2
2 files changed, 5 insertions, 3 deletions
diff --git a/frontend/src/components/modals/Modal.js b/frontend/src/components/modals/Modal.js
index ec6080f2..dd8cea8e 100644
--- a/frontend/src/components/modals/Modal.js
+++ b/frontend/src/components/modals/Modal.js
@@ -50,8 +50,10 @@ class Modal extends React.Component {
}
componentDidUpdate() {
- this.visible = this.props.show
- this.openOrCloseModal()
+ if (this.visible !== this.props.show) {
+ this.visible = this.props.show
+ this.openOrCloseModal()
+ }
}
onSubmit() {
diff --git a/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js b/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
index f1645dcf..c7c81706 100644
--- a/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
+++ b/frontend/src/components/modals/custom-components/ChangeTopologyModalComponent.js
@@ -7,7 +7,7 @@ class ChangeTopologyModalComponent extends React.Component {
static propTypes = {
show: PropTypes.bool.isRequired,
topologies: PropTypes.arrayOf(Shapes.Topology),
- currentTopologyId: PropTypes.number,
+ currentTopologyId: PropTypes.string,
onChooseTopology: PropTypes.func.isRequired,
onCreateTopology: PropTypes.func.isRequired,
onDuplicateTopology: PropTypes.func.isRequired,