useSoftInputHeightChanged
useSoftInputHeightChanged
is a shortcut for using AvoidSoftInput.onSoftInputHeightChange
method inside useEffect
.
Parameters
Type | Required | Description |
---|---|---|
({ softInputHeight }: { softInputHeight: number }) => void | yes | function called with current soft input height when soft input is displayed |
Example
import { useSoftInputHeightChanged } from "react-native-avoid-softinput";
useSoftInputHeightChanged(({ softInputHeight }) => {
// Do sth
});