FilesSelector: Fixed title if filter not set

This commit is contained in:
Ilya Oleshko 2023-11-02 17:20:11 +03:00
parent 8c2070cfe1
commit d61aad69c5
2 changed files with 5 additions and 1 deletions

View File

@ -23,7 +23,9 @@ export const getHeaderLabel = (
if (isMove) return t("Common:MoveTo");
if (isCopy) return t("Common:Copy");
if (isRestoreAll) return t("Common:Restore");
if (isSelect) return t("Common:SelectFile");
if (isSelect) {
return filterParam ? t("Common:SelectFile") : t("Common:SelectAction");
}
if (filterParam === FilesSelectorFilterTypes.DOCX)
return t("Translations:CreateMasterFormFromFile");

View File

@ -28,6 +28,7 @@ const FilesSelectorInput = (props) => {
filterParam,
descriptionText,
className,
isSelect,
} = props;
const isFilesSelection = !!filterParam;
@ -94,6 +95,7 @@ const FilesSelectorInput = (props) => {
id={id}
onClose={onClose}
isPanelVisible={isPanelVisible}
isSelect={isSelect}
{...(isFilesSelection ? filesSelectionProps : foldersSelectionProps)}
/>
</StyledBodyWrapper>