Client:FilesSelector: fix disabled items
This commit is contained in:
parent
2eb8bda527
commit
2200c6fa0e
@ -56,7 +56,7 @@ import InfoPanelStore from "SRC_DIR/store/InfoPanelStore";
|
|||||||
import { FilesSelectorProps } from "./FilesSelector.types";
|
import { FilesSelectorProps } from "./FilesSelector.types";
|
||||||
import { getAcceptButtonLabel, getHeaderLabel, getIsDisabled } from "./utils";
|
import { getAcceptButtonLabel, getHeaderLabel, getIsDisabled } from "./utils";
|
||||||
|
|
||||||
const disabledItems: (string | number)[] = [];
|
let disabledItems: (string | number)[] = [];
|
||||||
|
|
||||||
const FilesSelectorWrapper = ({
|
const FilesSelectorWrapper = ({
|
||||||
isPanelVisible = false,
|
isPanelVisible = false,
|
||||||
@ -177,6 +177,12 @@ const FilesSelectorWrapper = ({
|
|||||||
[t],
|
[t],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
return () => {
|
||||||
|
disabledItems = [];
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
const onAccept = async (
|
const onAccept = async (
|
||||||
selectedItemId: string | number | undefined,
|
selectedItemId: string | number | undefined,
|
||||||
folderTitle: string,
|
folderTitle: string,
|
||||||
|
Loading…
Reference in New Issue
Block a user