Skip to content

Commit

Permalink
Refs #38107 - fix all rows expanding issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ianballou committed Jan 15, 2025
1 parent 1983cdc commit 654bb12
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ const BootedContainerImagesPage = () => {
)}
</Tbody>
{results?.map((result, rowIndex) => {
const { bootcBootedImage, digests } = result;
const { bootc_booted_image: bootcBootedImage, digests } = result;
const isExpanded = imageIsExpanded(bootcBootedImage);
return (
<Tbody key="bootable-container-images-body" isExpanded={isExpanded}>
<Tbody key={`bootable-container-images-body-${bootcBootedImage}`} isExpanded={isExpanded}>
<Tr key={bootcBootedImage} ouiaId={`table-row-${rowIndex}`}>
<>
<Td
Expand All @@ -190,12 +190,12 @@ const BootedContainerImagesPage = () => {
isExpanded,
onToggle: (_event, _rInx, isOpen) =>
expandedImages.onToggle(isOpen, bootcBootedImage),
expandId: 'booted-containers-expander',
expandId: `booted-containers-expander-${bootcBootedImage}`,
}}
/>
{columnNamesKeys.map(k => (
<Td
key={k}
key={`${bootcBootedImage}-${keysToColumnNames[k]}`}
dataLabel={keysToColumnNames[k]}
>
{columns[k].wrapper ? columns[k].wrapper(result) : result[k]}
Expand All @@ -217,7 +217,7 @@ const BootedContainerImagesPage = () => {
</Thead>
<Tbody>
{digests.map((digest, index) => (
<Tr key={digest} ouiaId={`table-row-expandable-content-${index}`}>
<Tr key={digest.bootc_booted_digest} ouiaId={`table-row-expandable-content-${index}`}>
<Td>{digest.bootc_booted_digest}</Td>
<Td>
<a href={`/hosts?search=bootc_booted_digest%20=%20${digest.bootc_booted_digest}`}>{digest.host_count}</a>
Expand Down

0 comments on commit 654bb12

Please sign in to comment.