Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>01~
public getServices() {
if (!this.services) {
public getServices() {
if (!this.services) {
- throw "Please check if services have been set in the index.ts before the app is initiated";
+ throw "Please check if services have been set in the index.ts before the app is initiated"; // eslint-disable-line no-throw-literal
}
return this.services;
}
}
return this.services;
}
if (rightKey) {
fetchData(rightKey);
}
if (rightKey) {
fetchData(rightKey);
}
+ }, [rightKey]); // eslint-disable-line react-hooks/exhaustive-deps
React.useEffect(() => {
const hash = (collectionPanel.item || {}).portableDataHash;
React.useEffect(() => {
const hash = (collectionPanel.item || {}).portableDataHash;
if (hash && rightClickUsed) {
fetchData(rightKey, true);
}
if (hash && rightClickUsed) {
fetchData(rightKey, true);
}
- }, [(collectionPanel.item || {}).portableDataHash]);
+ }, [(collectionPanel.item || {}).portableDataHash]); // eslint-disable-line react-hooks/exhaustive-deps
React.useEffect(() => {
if (rightData) {
React.useEffect(() => {
if (rightData) {
- setCollectionFiles(rightData, false)(dispatch);
+ const filtered = rightData.filter(({ name }) => name.indexOf(rightSearch) > -1);
+ setCollectionFiles(filtered, false)(dispatch);
- }, [rightData, dispatch]);
+ }, [rightData, dispatch, rightSearch]);
const handleRightClick = React.useCallback(
(event) => {
const handleRightClick = React.useCallback(
(event) => {
onItemMenuOpen(event, item, isWritable);
}
},
onItemMenuOpen(event, item, isWritable);
}
},
- [onItemMenuOpen, isWritable, rightData]
+ [onItemMenuOpen, isWritable, rightData] // eslint-disable-line react-hooks/exhaustive-deps
);
React.useEffect(() => {
);
React.useEffect(() => {
props.onSelectionToggle(event, item);
}
},
props.onSelectionToggle(event, item);
}
},
- [path, setPath, collectionPanelFiles]
+ [path, setPath, collectionPanelFiles] // eslint-disable-line react-hooks/exhaustive-deps
);
const getItemIcon = React.useCallback(
);
const getItemIcon = React.useCallback(
(ev, isWritable) => {
props.onOptionsMenuOpen(ev, isWritable);
},
(ev, isWritable) => {
props.onOptionsMenuOpen(ev, isWritable);
},
- [props.onOptionsMenuOpen]
+ [props.onOptionsMenuOpen] // eslint-disable-line react-hooks/exhaustive-deps
import { Dispatch } from "redux";
import {
import { Dispatch } from "redux";
import {
COLLECTION_PANEL_LOAD_FILES_THRESHOLD
} from "./collection-panel-files/collection-panel-files-actions";
import { CollectionResource } from 'models/collection';
COLLECTION_PANEL_LOAD_FILES_THRESHOLD
} from "./collection-panel-files/collection-panel-files-actions";
import { CollectionResource } from 'models/collection';