Skip to content

Commit db731fd

Browse files
committed
fix: adjust accessory opacity animation timing and easing for smoother keyboard dismissal
1 parent 6511c59 commit db731fd

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

packages/react-native-fieldflow/src/FieldForm.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,8 @@ export const FieldForm = forwardRef<FieldFormHandle, FieldFormProps>((props, ref
345345
}).start();
346346
} else {
347347
// ── 'whenKeyboardOpen' mode ────────────────────────────────────
348-
// Keep opacity in sync with translateY on hide. A short opacity-only
349-
// window (e.g. 80ms) makes the bar vanish before the slide finishes,
350-
// so it reads as "fade only" instead of moving down with the keyboard.
348+
// Bar must disappear while the keyboard is dismissed, so stay
349+
// timed with the keyboard event duration.
351350
Animated.parallel([
352351
Animated.timing(accessoryTranslateY, {
353352
toValue: 0,
@@ -357,8 +356,8 @@ export const FieldForm = forwardRef<FieldFormHandle, FieldFormProps>((props, ref
357356
}),
358357
Animated.timing(accessoryOpacity, {
359358
toValue: 0,
360-
duration: dur,
361-
easing: hideTranslateEasing,
359+
duration: Math.min(dur * 0.25, 80),
360+
easing: Easing.in(Easing.quad),
362361
useNativeDriver: true,
363362
}),
364363
]).start();

0 commit comments

Comments
 (0)