Web:Add inProgressElement.

This commit is contained in:
gazizova-vlada 2023-09-11 15:17:38 +03:00
parent 8ecc18f927
commit 1b53207df0
2 changed files with 19 additions and 6 deletions

View File

@ -237,7 +237,7 @@ const NewFilesPanel = (props) => {
<Row
key={file.id}
element={element}
inProgress={currentOpenFileId === file.id.toString()}
inProgressElement={currentOpenFileId === file.id.toString()}
>
<StyledLink
onClick={onNewFileClick}

View File

@ -40,6 +40,7 @@ class Row extends React.Component {
isRoom,
withoutBorder,
contextTitle,
inProgressElement,
} = this.props;
const { onRowClick, inProgress, mode, onContextClick, ...rest } =
@ -144,14 +145,26 @@ class Row extends React.Component {
/>
</StyledCheckbox>
)}
{mode == "default" && renderElement && (
<StyledElement onClick={onRowClick} className="styled-element">
{element}
</StyledElement>
)}
</>
)}
{inProgressElement ? (
<Loader className="row-loader" type="oval" size="16px" />
) : (
mode == "default" &&
renderElement && (
<StyledElement onClick={onRowClick} className="styled-element">
{element}
</StyledElement>
)
)}
{mode == "default" && renderElement && (
<StyledElement onClick={onRowClick} className="styled-element">
{element}
</StyledElement>
)}
<StyledContent onClick={onRowClick} className="row_content">
{children}
</StyledContent>