Skip to content

Commit

Permalink
fix(SidePage,Sticky): fix max update depth error (#3293)
Browse files Browse the repository at this point in the history
  • Loading branch information
HelenaIsh authored Oct 24, 2023
1 parent 1beb6da commit 950988f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-ui/components/SidePage/SidePageHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export class SidePageHeader extends React.Component<SidePageHeaderProps, SidePag
private sticky: Sticky | null = null;
private lastRegularHeight = 0;
private setRootNode!: TSetRootNode;
private closeIcon = (<SidePageCloseButton />);

public get regularHeight(): number {
const { isReadyToFix } = this.state;
Expand Down Expand Up @@ -180,10 +181,10 @@ export class SidePageHeader extends React.Component<SidePageHeaderProps, SidePag
})}
>
{this.isMobileLayout ? (
<SidePageCloseButton />
this.closeIcon
) : (
<Sticky side="top" offset={stickyOffset}>
<SidePageCloseButton />
{this.closeIcon}
</Sticky>
)}
</div>
Expand Down

0 comments on commit 950988f

Please sign in to comment.