Skip to content

Commit

Permalink
fix: review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mournfulCoroner committed Jun 20, 2024
1 parent 6567960 commit 5abfd2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 0 additions & 4 deletions src/components/Sheet/Sheet.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@ $block: '.#{variables.$ns}sheet';
}
}

&__inner-content {
overflow: auto;
}

&__sheet-content-title {
padding-block-end: 8px;
font-size: var(--g-text-body-2-font-size);
Expand Down
13 changes: 4 additions & 9 deletions src/components/Sheet/SheetContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS
sheetTitleRef = React.createRef<HTMLDivElement>();
velocityTracker = new VelocityTracker();
observer: ResizeObserver | null = null;
resizeWindowTimer: NodeJS.Timeout | null = null;
resizeWindowTimer: number | null = null;

state: SheetContentState = {
startScrollTop: 0,
Expand Down Expand Up @@ -190,12 +190,7 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS
{title}
</div>
)}
<div
className={sheetBlock('inner-content')}
ref={this.sheetInnerContentRef}
>
{content}
</div>
<div ref={this.sheetInnerContentRef}>{content}</div>
</div>
</div>
</React.Fragment>
Expand Down Expand Up @@ -427,10 +422,10 @@ class SheetContent extends React.Component<SheetContentInnerProps, SheetContentS
this.setState({inWindowResizeScope: true});

if (this.resizeWindowTimer) {
clearTimeout(this.resizeWindowTimer);
window.clearTimeout(this.resizeWindowTimer);
}

this.resizeWindowTimer = setTimeout(() => {
this.resizeWindowTimer = window.setTimeout(() => {
this.onResize();
}, WINDOW_RESIZE_TIMEOUT);
};
Expand Down

0 comments on commit 5abfd2d

Please sign in to comment.