- <div className={classes.root}>
- <div className={classes.tree}>
- <ProjectsTreePicker
- pickerId={this.props.commandInput.id}
- includeCollections
- includeFiles
- showSelection
- toggleItemSelection={this.refreshFiles} />
- </div>
- <Divider />
- <div className={classes.chips}>
- <Typography variant='subheading'>Selected files ({this.state.files.length}):</Typography>
- <Chips
- orderable
- deletable
- values={this.state.files}
- onChange={this.setFiles}
- getLabel={(file: CollectionFile) => file.name} />
- </div>
- </div>
+ <Dialog
+ open={this.state.open}
+ onClose={this.closeDialog}
+ fullWidth
+ maxWidth='md' >
+ <DialogTitle>Choose files</DialogTitle>
+ <DialogContent className={classes.root}>
+ <div className={classes.pickerWrapper}>
+ <div className={classes.tree}>
+ <ProjectsTreePicker
+ pickerId={this.props.commandInput.id}
+ includeCollections
+ includeFiles
+ showSelection
+ options={this.props.options}
+ toggleItemSelection={this.refreshFiles} />
+ </div>
+ <Divider />
+ <div className={classes.chips}>
+ <Typography variant='subtitle1'>Selected files ({this.state.files.length}):</Typography>
+ <Chips
+ orderable
+ deletable
+ values={this.state.files}
+ onChange={this.setFiles}
+ getLabel={(file: CollectionFile) => file.name} />
+ </div>
+ </div>
+
+ </DialogContent>
+ <DialogActions>
+ <Button onClick={this.closeDialog}>Cancel</Button>
+ <Button
+ data-cy='ok-button'
+ variant='contained'
+ color='primary'
+ onClick={this.submit}>Ok</Button>
+ </DialogActions>
+ </Dialog>