diff --git a/packages/common-components/src/TextInput/FormikTextInput.tsx b/packages/common-components/src/TextInput/FormikTextInput.tsx index a454083a31..ee1ce8e62c 100644 --- a/packages/common-components/src/TextInput/FormikTextInput.tsx +++ b/packages/common-components/src/TextInput/FormikTextInput.tsx @@ -38,12 +38,7 @@ const FormikTextInput = React.forwardRef( name={field.name} value={field.value} placeholder={placeholder} - captionMessage={ - <> - {captionMessage && captionMessage} - {meta.touched && meta.error && `${meta.error}`} - - } + captionMessage={meta.error ? `${meta.error}` : captionMessage ? captionMessage : null} state={meta.error ? "error" : undefined} onChange={helpers.setValue} autoFocus={autoFocus} diff --git a/packages/files-ui/src/Components/Modules/FileBrowsers/views/FileSystemItemRow.tsx b/packages/files-ui/src/Components/Modules/FileBrowsers/views/FileSystemItemRow.tsx index a38bde9f5e..ecb96f943c 100644 --- a/packages/files-ui/src/Components/Modules/FileBrowsers/views/FileSystemItemRow.tsx +++ b/packages/files-ui/src/Components/Modules/FileBrowsers/views/FileSystemItemRow.tsx @@ -93,7 +93,8 @@ const useStyles = makeStyles(({ breakpoints, constants, palette }: CSFTheme) => borderTopLeftRadius: `${constants.generalUnit * 1.5}px`, borderTopRightRadius: `${constants.generalUnit * 1.5}px`, borderBottomLeftRadius: `${constants.generalUnit * 1.5}px`, - borderBottomRightRadius: `${constants.generalUnit * 1.5}px` + borderBottomRightRadius: `${constants.generalUnit * 1.5}px`, + maxWidth: `${breakpoints.width("md")}px !important` } }, renameHeader: { @@ -140,8 +141,11 @@ const useStyles = makeStyles(({ breakpoints, constants, palette }: CSFTheme) => }, filename: { whiteSpace: "nowrap", + textOverflow: "ellipsis", overflow: "hidden", - textOverflow: "ellipsis" + "&.editing": { + overflow: "visible" + } }, dropdownIcon: { "& svg": { @@ -427,7 +431,7 @@ const FileSystemItemRow: React.FC = ({ { if (!editing) { onFolderOrFileClicks() @@ -474,67 +478,70 @@ const FileSystemItemRow: React.FC = ({ ) : editing === cid && !desktop ? ( - setEditing("")} - > - + { - handleRename && + closePosition="none" + active={editing === cid} + setActive={() => setEditing("")} + > + { + handleRename && handleRename( `${currentPath}${name}`, `${currentPath}${values.fileName}` ) - setEditing(undefined) - }} - > -
- - Rename File/Folder - - -
- - -
- -
-
+ Rename File/Folder + + +
+ + +
+ +
+
+ {name} + ) : ( {name} )}