diff --git a/packages/app-file-manager/src/components/FileDetails/FileDetails.tsx b/packages/app-file-manager/src/components/FileDetails/FileDetails.tsx index bb456b0752e..20a2f4c44c4 100644 --- a/packages/app-file-manager/src/components/FileDetails/FileDetails.tsx +++ b/packages/app-file-manager/src/components/FileDetails/FileDetails.tsx @@ -1,5 +1,5 @@ import React, { useMemo, useState } from "react"; -// @ts-ignore +// @ts-expect-error import { useHotkeys } from "react-hotkeyz"; import omit from "lodash/omit"; import styled from "@emotion/styled"; @@ -74,6 +74,8 @@ const FileDetailsInner: React.FC = ({ file }) => { const { close } = useFileDetails(); const { fileDetails } = useFileManagerViewConfig(); + const [, leftPanel = "1", rightPanel = "1"] = fileDetails.width.split(","); + const extensionFields = useMemo(() => { const fields = fileModel.fields.find(field => field.fieldId === "extensions"); if (!fields?.settings?.fields) { @@ -91,6 +93,19 @@ const FileDetailsInner: React.FC = ({ file }) => { close(); }; + const basicFieldsElement = ( + + {fileDetails.fields.map(field => ( + + {field.element} + + ))} + + ); + + const extensionFieldsElement = + extensionFields.length > 0 ? : null; + return (
{() => ( @@ -99,30 +114,27 @@ const FileDetailsInner: React.FC = ({ file }) => {
- + - - - - - {fileDetails.fields.map(field => ( - - {field.element} - - ))} - - - {extensionFields.length > 0 ? ( + + {fileDetails.groupFields ? ( + + {basicFieldsElement} - + {extensionFieldsElement} - ) : null} - + + ) : ( + <> + {basicFieldsElement} + {extensionFieldsElement} + + )}