diff --git a/ui/components/findings/table/inline-resource-container.tsx b/ui/components/findings/table/inline-resource-container.tsx index 22ccb027e1..18db380529 100644 --- a/ui/components/findings/table/inline-resource-container.tsx +++ b/ui/components/findings/table/inline-resource-container.tsx @@ -5,7 +5,7 @@ import { getCoreRowModel, useReactTable, } from "@tanstack/react-table"; -import { AnimatePresence, motion } from "framer-motion"; +import { motion } from "framer-motion"; import { ChevronsDown } from "lucide-react"; import { useImperativeHandle, useRef } from "react"; @@ -213,109 +213,112 @@ export function InlineResourceContainer({ onMuteComplete: handleMuteComplete, }} > - + - - -
-
- {/* Resource rows or skeleton placeholder */} - - - {isLoading && rows.length === 0 ? ( - Array.from({ length: skeletonRowCount }).map((_, i) => ( - - )) - ) : rows.length > 0 ? ( - rows.map((row) => ( - { - // Don't open drawer if clicking interactive elements - // (links, buttons, checkboxes, dropdown items) - const target = e.target as HTMLElement; - if ( - target.closest( - "a, button, input, [role=menuitem]", - ) + +
+
+ {/* Resource rows or skeleton placeholder */} +
+ + {isLoading && rows.length === 0 ? ( + Array.from({ length: skeletonRowCount }).map((_, i) => ( + + )) + ) : rows.length > 0 ? ( + rows.map((row) => ( + { + // Don't open drawer if clicking interactive elements + // (links, buttons, checkboxes, dropdown items) + const target = e.target as HTMLElement; + if ( + target.closest( + "a, button, input, [role=menuitem]", ) - return; - drawer.openDrawer(row.index); - }} - > - {row.getVisibleCells().map((cell) => ( - - {flexRender( - cell.column.columnDef.cell, - cell.getContext(), - )} - - ))} - - )) - ) : ( - - - {getFindingGroupEmptyStateMessage(group, filters)} - + ) + return; + drawer.openDrawer(row.index); + }} + > + {row.getVisibleCells().map((cell) => ( + + {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} + + ))} - )} - -
+ )) + ) : ( + + + {getFindingGroupEmptyStateMessage(group, filters)} + + + )} + + - {/* Loading state for infinite scroll (subsequent pages only) */} - {isLoading && rows.length > 0 && ( - - )} + {/* Loading state for infinite scroll (subsequent pages only) */} + {isLoading && rows.length > 0 && ( + + )} - {/* Sentinel for scroll hint detection */} -
+ {/* Sentinel for scroll hint detection */} +
- {/* Sentinel for infinite scroll */} -
-
+ {/* Sentinel for infinite scroll */} +
+
- {/* Gradients rendered after scroll container so they paint on top */} -
-
+ {/* Gradients rendered after scroll container so they paint on top */} +
+
- {/* Scroll hint */} - {showScrollHint && ( -
-
-
- Scroll for - more -
+ {/* Scroll hint */} + {showScrollHint && ( +
+
+
+ Scroll for + more
- )} -
- - +
+ )} +
+ - + ({ ))} - {renderAfterRow?.(row)} + + {renderAfterRow?.(row)} + ), )