Skip to content

Commit

Permalink
fix: poor INP when opening drawer for the first time
Browse files Browse the repository at this point in the history
  • Loading branch information
iago1501 committed Nov 13, 2024
1 parent b703768 commit aee659a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function Drawer(props: Props) {
if (onVisibilityChanged !== undefined) {
onVisibilityChanged(isMenuOpen)
}
}, [onVisibilityChanged, isMenuOpen])
}, [onVisibilityChanged, isMenuOpen])

const handleContainerClick: MouseEventHandler<HTMLElement> = event => {
// target is the clicked element
Expand Down Expand Up @@ -259,7 +259,7 @@ function Drawer(props: Props) {
className={`${handles.childrenContainer} flex flex-grow-1`}
onClick={handleContainerClick}
>
{ shouldRenderChildren ? children : <></> }
{shouldRenderChildren ? children : <></>}
</div>
{/* eslint-enable jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
</div>
Expand Down

0 comments on commit aee659a

Please sign in to comment.