Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/components/KeyboardAvoidingView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,16 @@ const KeyboardAvoidingView = forwardRef<
);

const animatedStyle = useAnimatedStyle(() => {
if (!enabled) {
return {};
}

const bottom = interpolateToRelativeKeyboardHeight(
keyboard.progress.value,
);
const translateY = interpolateToRelativeKeyboardHeight(translate.value);
const paddingBottom = interpolateToRelativeKeyboardHeight(padding.value);
const bottomHeight = enabled ? bottom : 0;
const height = frame.value.height - bottomHeight;
const height = frame.value.height - bottom;

switch (behavior) {
case "height":
Expand All @@ -159,10 +162,10 @@ const KeyboardAvoidingView = forwardRef<
return {};

case "position":
return { bottom: bottomHeight };
return { bottom };

case "padding":
return { paddingBottom: bottomHeight };
return { paddingBottom: bottom };

case "translate-with-padding":
return {
Expand Down