fix: keyboard handler memoization (#6719)

* fix: keyboard handler memoization

* fix: return missing dependency
This commit is contained in:
Kirill Zyusko
2024-11-25 16:03:55 +01:00
committed by GitHub
parent 5164ca6288
commit 723bbfc58a
2 changed files with 33 additions and 27 deletions
+8 -5
View File
@@ -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)