import { connect, DispatchProp } from 'react-redux';
import { initProjectsTreePicker, getSelectedNodes, treePickerActions, getProjectsTreePickerIds, getAllNodes } from '~/store/tree-picker/tree-picker-actions';
import { ProjectsTreePickerItem } from '~/views-components/projects-tree-picker/generic-projects-tree-picker';
-import { CollectionFile, CollectionFileType } from '~/models/collection-file';
import { createSelector, createStructuredSelector } from 'reselect';
import { ChipsInput } from '~/components/chips-input/chips-input';
import { identity, values, noop } from 'lodash';
this.setState({ open: true });
}
-
closeDialog = () => {
this.setState({ open: false });
}
<ChipsInput
value={this.props.input.value}
onChange={noop}
+ disabled={this.props.commandInput.disabled}
createNewValue={identity}
getLabel={(data: FormattedDirectory) => data.name}
inputComponent={this.textInput} />
{...props}
error={this.props.meta.touched && !!this.props.meta.error}
readOnly
- onClick={this.openDialog}
- onKeyPress={this.openDialog}
- onBlur={this.props.input.onBlur} />
+ onClick={!this.props.commandInput.disabled ? this.openDialog : undefined}
+ onKeyPress={!this.props.commandInput.disabled ? this.openDialog : undefined}
+ onBlur={this.props.input.onBlur}
+ disabled={this.props.commandInput.disabled} />
dialog = () =>
<Dialog
</div>
<Divider />
<div className={classes.chips}>
- <Typography variant='subheading'>Selected collections ({this.state.directories.length}):</Typography>
+ <Typography variant='subtitle1'>Selected collections ({this.state.directories.length}):</Typography>
<Chips
orderable
deletable