const [path, setPath]: any = React.useState([]);
const [pathData, setPathData]: any = React.useState({});
const [isLoading, setIsLoading] = React.useState(false);
- const [rightClickUsed, setRightClickUsed] = React.useState(false);
+ const [collectionAutofetchEnabled, setCollectionAutofetchEnabled] = React.useState(false);
const [leftSearch, setLeftSearch] = React.useState('');
const [rightSearch, setRightSearch] = React.useState('');
React.useEffect(() => {
const hash = (collectionPanel.item || {}).portableDataHash;
- if (hash && rightClickUsed) {
+ if (hash && collectionAutofetchEnabled) {
fetchData([leftKey, rightKey], true);
}
}, [(collectionPanel.item || {}).portableDataHash]); // eslint-disable-line react-hooks/exhaustive-deps
if (id) {
onItemMenuOpen(event, item, isWritable);
- if (!rightClickUsed) {
- setRightClickUsed(true);
+ if (!collectionAutofetchEnabled) {
+ setCollectionAutofetchEnabled(true);
}
}
},
className={classes.pathPanelItem}
data-breadcrumb-path={p}
>
- {index === 0 ? 'Home' : p} /
+ <span className={classes.rowActive}>{index === 0 ? 'Home' : p}</span> <b>/</b>
</span>)
}
</div>
<Tooltip className={classes.pathPanelMenu} title="More options" disableFocusListener>
<IconButton
data-cy='collection-files-panel-options-btn'
- onClick={(ev) => onOptionsMenuOpen(ev, isWritable)}>
+ onClick={(ev) => {
+ if (!collectionAutofetchEnabled) {
+ setCollectionAutofetchEnabled(true);
+ }
+ onOptionsMenuOpen(ev, isWritable);
+ }}>
<CustomizeTableIcon />
</IconButton>
</Tooltip>