Просмотр исходного кода

Show endpoint credentials after Endpoint Details View page is reloaded instead of the continous loading animation

Sergiu Miclea 8 лет назад
Родитель
Сommit
ce8e9476f8
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      src/components/CloudConnectionsView/CloudConnectionsView.js

+ 3 - 0
src/components/CloudConnectionsView/CloudConnectionsView.js

@@ -71,6 +71,9 @@ class CloudConnectionsView extends Component {
   componentWillReceiveProps(newProps) {
     if (newProps.connections) {
       let connection = newProps.connections.filter(item => item.id === this.props.connectionId)[0]
+      if (!connection.credentials) {
+        ConnectionsActions.loadConnectionDetail(connection.id)
+      }
 
       this.setState({ connection: connection })
     }