Skip to content

Commit

Permalink
Add portal to the column renderer
Browse files Browse the repository at this point in the history
Signed-off-by: popcorny <[email protected]>
Co-authored-by:  even-wei <[email protected]>
  • Loading branch information
popcornylu and even-wei committed Jan 16, 2025
1 parent 3535f34 commit e52e384
Showing 1 changed file with 26 additions and 21 deletions.
47 changes: 26 additions & 21 deletions js/src/components/valuediff/ValueDiffResultView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
MenuGroup,
MenuItem,
MenuList,
Portal,
Spacer,
} from "@chakra-ui/react";

Expand Down Expand Up @@ -70,27 +71,31 @@ function ColumnNameCell({
size={"sm"}
/>

<MenuList lineHeight="20px">
<MenuGroup title="Action" as={Box} fontSize="8pt">
<MenuItem
fontSize="10pt"
onClick={() => handleValueDiffDetail({}, { showForm: true })}
>
Show mismatched values...
</MenuItem>
<MenuItem
fontSize="10pt"
onClick={() =>
handleValueDiffDetail(
{ columns: [column] },
{ showForm: false }
)
}
>
Show mismatched values for &apos;{column}&apos;
</MenuItem>
</MenuGroup>
</MenuList>
<Portal>
<MenuList lineHeight="20px">
<MenuGroup title="Action" as={Box} fontSize="8pt">
<MenuItem
fontSize="10pt"
onClick={() =>
handleValueDiffDetail({}, { showForm: true })
}
>
Show mismatched values...
</MenuItem>
<MenuItem
fontSize="10pt"
onClick={() =>
handleValueDiffDetail(
{ columns: [column] },
{ showForm: false }
)
}
>
Show mismatched values for &apos;{column}&apos;
</MenuItem>
</MenuGroup>
</MenuList>
</Portal>
</>
)}
</Menu>
Expand Down

0 comments on commit e52e384

Please sign in to comment.