Skip to content

Commit 5a0e4a4

Browse files
[frontend] Avoid full re-render on analyses tab selection (OpenCTI-Platform#9491) (OpenCTI-Platform#12284)
1 parent d71862d commit 5a0e4a4

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

opencti-platform/opencti-front/src/private/components/arsenal/malwares/Root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ const RootMalware = ({ queryRef, malwareId }: RootMalwareProps) => {
221221
path="/"
222222
element={
223223
<Malware malwareData={malware}/>
224-
}
224+
}
225225
/>
226226
<Route
227227
path="/knowledge"

opencti-platform/opencti-front/src/private/components/common/containers/StixCoreObjectOrStixCoreRelationshipContainers.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import React, { Suspense } from 'react';
22
import makeStyles from '@mui/styles/makeStyles';
33
import Box from '@mui/material/Box';
44
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
@@ -326,12 +326,14 @@ const StixCoreObjectOrStixCoreRelationshipContainers = ({
326326
};
327327

328328
return (
329-
<div
330-
className={view === 'lines' ? classes.container : classes.containerGraph}
331-
>
332-
{view === 'lines' ? renderLines() : ''}
333-
{view === 'graph' ? renderGraph() : ''}
334-
</div>
329+
<Suspense>
330+
<div
331+
className={view === 'lines' ? classes.container : classes.containerGraph}
332+
>
333+
{view === 'lines' ? renderLines() : ''}
334+
{view === 'graph' ? renderGraph() : ''}
335+
</div>
336+
</Suspense>
335337
);
336338
};
337339

0 commit comments

Comments
 (0)