Răsfoiți Sursa

Merge pull request #117 from smiclea/fix-modal-redirect

Restore window scroll after modal redirects
Dorin Paslaru 8 ani în urmă
părinte
comite
acb025b941

+ 1 - 0
src/components/pages/EndpointDetailsPage/EndpointDetailsPage.jsx

@@ -133,6 +133,7 @@ class EndpointDetailsPage extends React.Component {
   }
   }
 
 
   handleDeleteEndpointConfirmation() {
   handleDeleteEndpointConfirmation() {
+    this.setState({ showDeleteEndpointConfirmation: false })
     window.location.href = '/#/endpoints'
     window.location.href = '/#/endpoints'
     EndpointActions.delete(this.getEndpoint())
     EndpointActions.delete(this.getEndpoint())
   }
   }

+ 1 - 0
src/components/pages/MigrationDetailsPage/MigrationDetailsPage.jsx

@@ -102,6 +102,7 @@ class MigrationDetailsPage extends React.Component {
   }
   }
 
 
   handleDeleteMigrationConfirmation() {
   handleDeleteMigrationConfirmation() {
+    this.setState({ showDeleteMigrationConfirmation: false })
     window.location.href = '/#/migrations'
     window.location.href = '/#/migrations'
     MigrationActions.delete(this.props.migrationStore.migrationDetails.id)
     MigrationActions.delete(this.props.migrationStore.migrationDetails.id)
   }
   }

+ 1 - 0
src/components/pages/ReplicaDetailsPage/ReplicaDetailsPage.jsx

@@ -152,6 +152,7 @@ class ReplicaDetailsPage extends React.Component {
   }
   }
 
 
   handleDeleteReplicaConfirmation() {
   handleDeleteReplicaConfirmation() {
+    this.setState({ showDeleteReplicaConfirmation: false })
     window.location.href = '/#/replicas'
     window.location.href = '/#/replicas'
     ReplicaActions.delete(this.props.replicaStore.replicaDetails.id)
     ReplicaActions.delete(this.props.replicaStore.replicaDetails.id)
   }
   }