We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5005dca commit 5815a58Copy full SHA for 5815a58
packages/uikit-react-native/src/hooks/useKeyboardStatus.ts
@@ -9,9 +9,14 @@ type KeyboardEvents = {
9
hideEvent: KeyboardEventName;
10
};
11
12
+let isLayoutAnimationConfigured = false;
13
+
14
const configureNextLayoutAnimation = (event: KeyboardEvent) => {
15
+ if (isLayoutAnimationConfigured) return;
16
const config = LayoutAnimation.create(event.duration, event.easing, LayoutAnimation.Properties.scaleY);
- LayoutAnimation.configureNext(config);
17
+ isLayoutAnimationConfigured = true;
18
+ const onEnd = () => (isLayoutAnimationConfigured = false);
19
+ LayoutAnimation.configureNext(config, onEnd, onEnd);
20
21
22
const { showEvent, hideEvent } = Platform.select<KeyboardEvents>({
0 commit comments