mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-10-23 11:54:20 +00:00
fix(ui): resource tab scroll from container
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -1087,6 +1087,7 @@ export function ResourceDetailDrawerContent({
|
||||
<ResourceMetadataPanel
|
||||
metadata={f?.resourceMetadata}
|
||||
details={f?.resourceDetails}
|
||||
fill
|
||||
/>
|
||||
)}
|
||||
</TabsContent>
|
||||
|
||||
@@ -10,6 +10,13 @@ import { parseMetadata } from "@/lib/resource-metadata";
|
||||
interface ResourceMetadataPanelProps {
|
||||
metadata: Record<string, unknown> | string | null | undefined;
|
||||
details: string | null | undefined;
|
||||
/**
|
||||
* When true the metadata editor fills the available height and scrolls
|
||||
* internally. Only enable this when the panel is rendered inside a bounded
|
||||
* flex container; otherwise the editor collapses. Defaults to growing with
|
||||
* its content.
|
||||
*/
|
||||
fill?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -24,6 +31,7 @@ interface ResourceMetadataPanelProps {
|
||||
export function ResourceMetadataPanel({
|
||||
metadata,
|
||||
details,
|
||||
fill = false,
|
||||
}: ResourceMetadataPanelProps) {
|
||||
const parsedMetadata = parseMetadata(metadata);
|
||||
const hasMetadata =
|
||||
@@ -58,7 +66,7 @@ export function ResourceMetadataPanel({
|
||||
copyValue={formattedMetadata}
|
||||
editable={false}
|
||||
minHeight={220}
|
||||
fill
|
||||
fill={fill}
|
||||
showCopyButton
|
||||
onChange={() => {}}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user