const [path, setPath]: any = React.useState([]);
const [pathData, setPathData]: any = React.useState({});
const [isLoading, setIsLoading] = React.useState(false);
- const [collectionAutofetchEnabled, setCollectionAutofetchEnabled] = React.useState(false);
const [leftSearch, setLeftSearch] = React.useState('');
const [rightSearch, setRightSearch] = React.useState('');
if (id) {
onItemMenuOpen(event, item, isWritable);
-
- if (!collectionAutofetchEnabled) {
- setCollectionAutofetchEnabled(true);
- }
}
},
[onItemMenuOpen, isWritable, rightData] // eslint-disable-line react-hooks/exhaustive-deps
<IconButton
data-cy='collection-files-panel-options-btn'
onClick={(ev) => {
- if (!collectionAutofetchEnabled) {
- setCollectionAutofetchEnabled(true);
- }
onOptionsMenuOpen(ev, isWritable);
}}>
<CustomizeTableIcon />
className={classes.uploadButton}
data-cy='upload-button'
onClick={() => {
- if (!collectionAutofetchEnabled) {
- setCollectionAutofetchEnabled(true);
- }
onUploadDataClick();
}}
variant='contained'