Skip to content

Commit

Permalink
fix(pte): PTE modal seems to re-render on validation state change due…
Browse files Browse the repository at this point in the history
… to tooltip disabled change (#5766)
  • Loading branch information
pedrobonamin authored Feb 16, 2024
1 parent c4baaab commit c24e4d9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ export function BlockObject(props: BlockObjectProps) {
<Tooltip
placement="top"
portal="editor"
disabled={!tooltipEnabled}
// If the object modal is open, disable the tooltip to avoid it rerendering the inner items when the validation changes.
disabled={isOpen ? true : !tooltipEnabled}
content={toolTipContent}
>
<PreviewContainer {...innerPaddingProps}>
Expand Down Expand Up @@ -342,6 +343,7 @@ export function BlockObject(props: BlockObjectProps) {
toolTipContent,
tooltipEnabled,
value,
isOpen,
],
)
}
Expand Down

0 comments on commit c24e4d9

Please sign in to comment.