fix: validateDOMNesting error on nodeToolbarComponent (#5212)

🐛 (use-patch-update-flow.ts): change 'locked' property to optional by using '?' to match interface definition
📝 (index.tsx): add 'asChild' prop to Button component to pass it down as a prop to the child component
This commit is contained in:
Cristhian Zanforlin Lousa 2024-12-12 16:54:07 -03:00 committed by GitHub
commit 94fa92f718
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View file

@ -12,7 +12,7 @@ interface IPatchUpdateFlow {
description: string;
folder_id: string | null | undefined;
endpoint_name: string | null | undefined;
locked: boolean | null | undefined;
locked?: boolean | null | undefined;
}
export const usePatchUpdateFlow: useMutationFunctionType<

View file

@ -542,13 +542,13 @@ export default function NodeToolbarComponent({
>
<SelectTrigger className="w-62">
<ShadTooltip content="Show More" side="top">
<div>
<div data-testid="more-options-modal">
<Button
className="node-toolbar-buttons h-[2rem] w-[2rem]"
variant="ghost"
onClick={handleButtonClick}
size="node-toolbar"
data-testid="more-options-modal"
asChild
>
<IconComponent name="MoreHorizontal" className="h-4 w-4" />
</Button>