From a25347e958ffbceb0baf59ce95ec96ae997642ff Mon Sep 17 00:00:00 2001 From: Elena Ishmatova Date: Thu, 19 Oct 2023 10:17:01 +0600 Subject: [PATCH 1/3] fix(Sticky): fix maximum update depth error --- packages/react-ui/components/Sticky/Sticky.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-ui/components/Sticky/Sticky.tsx b/packages/react-ui/components/Sticky/Sticky.tsx index a89c1804f0a..7ea6b0539bc 100644 --- a/packages/react-ui/components/Sticky/Sticky.tsx +++ b/packages/react-ui/components/Sticky/Sticky.tsx @@ -99,8 +99,9 @@ export class Sticky extends React.Component { this.reflowCounter += 1; return; } + } else { + this.reflowCounter = 0; } - this.reflowCounter = 0; } public render() { From 131bb6997f40ce6560e1bb02896a5e064438b82b Mon Sep 17 00:00:00 2001 From: Elena Ishmatova Date: Tue, 24 Oct 2023 14:46:47 +0600 Subject: [PATCH 2/3] chore: assign to a variable --- packages/react-ui/components/SidePage/SidePageHeader.tsx | 5 +++-- packages/react-ui/components/Sticky/Sticky.tsx | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-ui/components/SidePage/SidePageHeader.tsx b/packages/react-ui/components/SidePage/SidePageHeader.tsx index 4548f40d6c9..7911cc5c129 100644 --- a/packages/react-ui/components/SidePage/SidePageHeader.tsx +++ b/packages/react-ui/components/SidePage/SidePageHeader.tsx @@ -59,6 +59,7 @@ export class SidePageHeader extends React.Component); public get regularHeight(): number { const { isReadyToFix } = this.state; @@ -180,10 +181,10 @@ export class SidePageHeader extends React.Component {this.isMobileLayout ? ( - + this.closeIcon ) : ( - + {this.closeIcon} )} diff --git a/packages/react-ui/components/Sticky/Sticky.tsx b/packages/react-ui/components/Sticky/Sticky.tsx index 7ea6b0539bc..00c0c485883 100644 --- a/packages/react-ui/components/Sticky/Sticky.tsx +++ b/packages/react-ui/components/Sticky/Sticky.tsx @@ -99,7 +99,6 @@ export class Sticky extends React.Component { this.reflowCounter += 1; return; } - } else { this.reflowCounter = 0; } } From bf7cfe23d9ddec93565cadf6ec0befcf454dc7f7 Mon Sep 17 00:00:00 2001 From: Elena Ishmatova Date: Tue, 24 Oct 2023 14:49:58 +0600 Subject: [PATCH 3/3] chore: fix --- packages/react-ui/components/Sticky/Sticky.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-ui/components/Sticky/Sticky.tsx b/packages/react-ui/components/Sticky/Sticky.tsx index 00c0c485883..a89c1804f0a 100644 --- a/packages/react-ui/components/Sticky/Sticky.tsx +++ b/packages/react-ui/components/Sticky/Sticky.tsx @@ -99,8 +99,8 @@ export class Sticky extends React.Component { this.reflowCounter += 1; return; } - this.reflowCounter = 0; } + this.reflowCounter = 0; } public render() {