Merge remote-tracking branch 'origin/main' into 19311-Project-Search-field-auto-clears
[arvados-workbench2.git] / src / views / run-process-panel / inputs / project-input.tsx
index 7b45a6d18e18ac59e0cdf479f67659c239f81669..0c962ed8a326116f0c1134540e8d3f526d1c82a4 100644 (file)
@@ -72,6 +72,7 @@ export const ProjectInputComponent = connect(mapStateToProps)(
         }
 
         openDialog = () => {
+            this.componentDidMount();
             this.setState({ open: true });
         }
 
@@ -109,7 +110,7 @@ export const ProjectInputComponent = connect(mapStateToProps)(
         }
 
         renderDialog() {
-            return <Dialog
+            return this.state.open ? <Dialog
                 open={this.state.open}
                 onClose={this.closeDialog}
                 fullWidth
@@ -130,7 +131,7 @@ export const ProjectInputComponent = connect(mapStateToProps)(
                         color='primary'
                         onClick={this.submit}>Ok</Button>
                 </DialogActions>
-            </Dialog>;
+            </Dialog> : null;
         }
 
     });