summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-07-03 11:46:29 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:47:22 +0200
commit52865c97f820b883977179930ce4961abdb39c12 (patch)
tree6b429d80694d7e5729fb1f41ff8f9ba4b2d07d4b /frontend/src/components/modals
parent39277c91281dbc7bd40bdffabc5b5675e9ede483 (diff)
Fix integer IDs and topology deletion
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,