Skip to content

Commit 9c18356

Browse files
authored
Fix for flickering page when opening findings flyout (elastic#229016)
## Summary This PR addresses the issue where Findings Flyout flickers when it first being rendered https://github.com/user-attachments/assets/13ef6536-3d8a-46ae-a551-6e74ec7c4f42
1 parent b3006c6 commit 9c18356

File tree

1 file changed

+28
-12
lines changed
  • x-pack/solutions/security/plugins/cloud_security_posture/public

1 file changed

+28
-12
lines changed

x-pack/solutions/security/plugins/cloud_security_posture/public/plugin.tsx

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,36 +152,52 @@ export class CspPlugin
152152
getCloudSecurityPostureMisconfigurationFlyout: () => {
153153
return {
154154
Component: (props: FindingsMisconfigurationPanelExpandableFlyoutProps['params']) => (
155-
<LazyCspFindingsMisconfigurationFlyout {...props}>
156-
{props.children}
157-
</LazyCspFindingsMisconfigurationFlyout>
155+
<Suspense fallback={<CspLoadingState />}>
156+
<LazyCspFindingsMisconfigurationFlyout {...props}>
157+
{props.children}
158+
</LazyCspFindingsMisconfigurationFlyout>
159+
</Suspense>
158160
),
159161
Header: (props: FindingsMisconfigurationFlyoutHeaderProps) => (
160-
<LazyCspFindingsMisconfigurationFlyoutHeader {...props} />
162+
<Suspense fallback={<CspLoadingState />}>
163+
<LazyCspFindingsMisconfigurationFlyoutHeader {...props} />
164+
</Suspense>
161165
),
162166
Body: (props: FindingsMisconfigurationFlyoutContentProps) => (
163-
<LazyCspFindingsMisconfigurationFlyoutBody {...props} />
167+
<Suspense fallback={<CspLoadingState />}>
168+
<LazyCspFindingsMisconfigurationFlyoutBody {...props} />
169+
</Suspense>
164170
),
165171
Footer: (props: FindingMisconfigurationFlyoutFooterProps) => (
166-
<LazyCspFindingsMisconfigurationFlyoutFooter {...props} />
172+
<Suspense fallback={<CspLoadingState />}>
173+
<LazyCspFindingsMisconfigurationFlyoutFooter {...props} />
174+
</Suspense>
167175
),
168176
};
169177
},
170178
getCloudSecurityPostureVulnerabilityFlyout: () => {
171179
return {
172180
Component: (props: FindingsVulnerabilityPanelExpandableFlyoutProps['params']) => (
173-
<LazyCspFindingsVulnerabilityFlyout {...props}>
174-
{props.children}
175-
</LazyCspFindingsVulnerabilityFlyout>
181+
<Suspense fallback={<CspLoadingState />}>
182+
<LazyCspFindingsVulnerabilityFlyout {...props}>
183+
{props.children}
184+
</LazyCspFindingsVulnerabilityFlyout>
185+
</Suspense>
176186
),
177187
Header: (props: FindingsVulnerabilityFlyoutHeaderProps) => (
178-
<LazyCspFindingsVulnerabilityFlyoutHeader {...props} />
188+
<Suspense fallback={<CspLoadingState />}>
189+
<LazyCspFindingsVulnerabilityFlyoutHeader {...props} />
190+
</Suspense>
179191
),
180192
Body: (props: FindingsVulnerabilityFlyoutContentProps) => (
181-
<LazyCspFindingsVulnerabilityFlyoutBody {...props} />
193+
<Suspense fallback={<CspLoadingState />}>
194+
<LazyCspFindingsVulnerabilityFlyoutBody {...props} />
195+
</Suspense>
182196
),
183197
Footer: (props: FindingsVulnerabilityFlyoutFooterProps) => (
184-
<LazyCspFindingsVulnerabilityFlyoutFooter {...props} />
198+
<Suspense fallback={<CspLoadingState />}>
199+
<LazyCspFindingsVulnerabilityFlyoutFooter {...props} />
200+
</Suspense>
185201
),
186202
};
187203
},

0 commit comments

Comments
 (0)