items: any;
isWritable: boolean;
isLoading: boolean;
- tooManyFiles: boolean;
onUploadDataClick: (targetLocation?: string) => void;
onSearchChange: (searchValue: string) => void;
onItemMenuOpen: (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>, isWritable: boolean) => void;
const rightData = pathData[rightKey];
React.useEffect(() => {
+ console.log(' --> useEffect current UUID: ', props.currentItemUuid);
if (props.currentItemUuid) {
setPathData({});
setPath([props.currentItemUuid]);
.then((requests) => {
const newState = requests.map((request, index) => {
if (request && request.responseXML != null) {
+ console.log(">>> got data for key", keyArray[index]);
const key = keyArray[index];
const result: any = extractFilesData(request.responseXML);
const sortedResult = sortBy(result, (n) => n.name).sort((n1, n2) => {
};
React.useEffect(() => {
+ console.log('---> useEffect rightKey', rightKey);
if (rightKey) {
fetchData(rightKey);
setLeftSearch('');
const currentPDH = (collectionPanel.item || {}).portableDataHash;
React.useEffect(() => {
+ console.log('---> useEffect PDH change:', currentPDH);
if (currentPDH) {
fetchData([leftKey, rightKey], true);
}
}, [currentPDH]); // eslint-disable-line react-hooks/exhaustive-deps
React.useEffect(() => {
+ console.log('---> useEffect rightData:', rightData, dispatch, rightSearch);
if (rightData) {
const filtered = rightData.filter(({ name }) => name.indexOf(rightSearch) > -1);
setCollectionFiles(filtered, false)(dispatch);
);
React.useEffect(() => {
+ console.log('---> useEffect parentRef:', parentRef, handleRightClick);
let node = null;
if (parentRef && parentRef.current) {
[props.onOptionsMenuOpen] // eslint-disable-line react-hooks/exhaustive-deps
);
+ console.log('---> render CollectionPanel <------');
return <div data-cy="collection-files-panel" onClick={handleClick} ref={parentRef}>
<div className={classes.pathPanel}>
<div className={classes.pathPanelPathWrapper}>
<div className={classes.dataWrapper}>{ rightData && !isLoading
? <AutoSizer defaultHeight={500}>{({ height, width }) => {
const filtered = rightData.filter(({ name }) => name.indexOf(rightSearch) > -1);
+ console.log("Right Data: ", filtered);
return !!filtered.length
? <FixedSizeList height={height} itemCount={filtered.length}