diff options
author | Kirill Zyusko <zyusko.kirik@gmail.com> | 2024-11-25 16:03:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 15:03:55 +0000 |
commit | 723bbfc58a1bb30ee0eed8e2e61d06bff2f10ece (patch) | |
tree | ff4c287fc6bd99729e5de85f16ce0441cb753dd3 /src/components/Dialog/index.tsx | |
parent | 5164ca6288c233de1ea351e9d5e9a7218a8a3b34 (diff) | |
download | voidsky-723bbfc58a1bb30ee0eed8e2e61d06bff2f10ece.tar.zst |
fix: keyboard handler memoization (#6719)
* fix: keyboard handler memoization * fix: return missing dependency
Diffstat (limited to 'src/components/Dialog/index.tsx')
-rw-r--r-- | src/components/Dialog/index.tsx | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/components/Dialog/index.tsx b/src/components/Dialog/index.tsx index c9455c5cc..f16a9925d 100644 --- a/src/components/Dialog/index.tsx +++ b/src/components/Dialog/index.tsx @@ -214,12 +214,15 @@ export const ScrollableInner = React.forwardRef<ScrollView, DialogInnerProps>( } }) - useKeyboardHandler({ - onEnd: e => { - 'worklet' - runOnJS(setKeyboardHeight)(e.height) + useKeyboardHandler( + { + onEnd: e => { + 'worklet' + runOnJS(setKeyboardHeight)(e.height) + }, }, - }) + [], + ) const basePading = (isIOS ? 30 : 50) + (isIOS ? keyboardHeight / 4 : keyboardHeight) |