From e354860c388c4c12f91995cfd834eddd5c426530 Mon Sep 17 00:00:00 2001 From: leutinatasya Date: Wed, 18 Oct 2023 16:48:02 +0300 Subject: [PATCH] fix: translate on resize --- src/components/Sheet/SheetContent.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/Sheet/SheetContent.tsx b/src/components/Sheet/SheetContent.tsx index 730af733e4..25b58a9719 100644 --- a/src/components/Sheet/SheetContent.tsx +++ b/src/components/Sheet/SheetContent.tsx @@ -382,7 +382,7 @@ class SheetContent extends React.Component) => { if (e.propertyName === 'height') { if (this.sheetContentRef.current) { - this.sheetContentRef.current.style.transition = 'none'; + // this.sheetContentRef.current.style.transition = 'none'; } } }; @@ -403,14 +403,15 @@ class SheetContent extends React.Component= viewportHeight ? viewportHeight * MAX_CONTENT_HEIGHT_FROM_VIEWPORT_COEFFICIENT : contentHeight; - const resultContentHeight = resultFullHeight - this.sheetTopHeight; - this.sheetContentRef.current.style.height = `${resultContentHeight}px`; - this.sheetRef.current.style.transform = `translate3d(0, -${resultFullHeight}px, 0)`; + this.sheetContentRef.current.style.height = `${resultHeight}px`; + this.sheetRef.current.style.transform = `translate3d(0, -${ + resultHeight + this.sheetTopHeight + }px, 0)`; }; private addListeners() {