useSoftInputShown
useSoftInputShown
is a shortcut for using AvoidSoftInput.onSoftInputShown
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 { useSoftInputShown } from "react-native-avoid-softinput";
useSoftInputShown(({ softInputHeight }) => {
// Do sth
});