Skip to main content
Version: Next

onSoftInputAppliedOffsetChange

Use onSoftInputAppliedOffsetChange method, to e.g. create animation based on current applied offset value.

Parameters

TypeRequiredDescription
({ appliedOffset }: { appliedOffset: number }) => voidyesfunction called during applying padding or translation with current applied value

Example

import { AvoidSoftInput } from "react-native-avoid-softinput";

const unsubscribe = AvoidSoftInput.onSoftInputAppliedOffsetChange(
({ appliedOffset }) => {
// Do sth
}
);

// Later invoke unsubscribe.remove()