Skip to main content
Version: 7.0.x

onSoftInputHeightChange

Use onSoftInputHeightChange method, if you want to listen to events when soft input's height changes.

Parameters

TypeRequiredDescription
({ softInputHeight }: { softInputHeight: number }) => voidyesfunction called with current soft input height when soft input is displayed

Example

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

const unsubscribe = AvoidSoftInput.onSoftInputHeightChange(
({ softInputHeight }) => {
// Do sth
}
);

// later invoke unsubscribe.remove()