-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #222 from mateusz1913/chore/v7-docs
chore: prepare docs for v7
- Loading branch information
Showing
52 changed files
with
1,722 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
id: migration_from_v6_to_v7 | ||
title: Migration from v6 to v7 | ||
sidebar_label: Migration from v6 to v7 | ||
keywords: [react-native-avoid-softinput, migration] | ||
--- | ||
|
||
## Migrate to [`react-native-edge-to-edge`](https://github.com/zoontek/react-native-edge-to-edge) to provide best support for Android 15 "edge to edge" mode | ||
|
||
Since v7, the library supports detection of `react-native-edge-to-edge`. | ||
Follow the [installation page](./INSTALLATION.mdx) for the recommended setup for keyboard handling on Android. | ||
Existing `AvoidSoftInput.setShouldMimicIOSBehavior` function is considered deprecated from v7 and will be removed in future major versions. | ||
|
||
```diff | ||
useEffect(() => { | ||
- AvoidSoftInput.setShouldMimicIOSBehavior(true); // <---- Tell Android that library will handle keyboard insets manually to match iOS behavior | ||
AvoidSoftInput.setEnabled(true); // <---- Enable module | ||
}, []); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ersioned_docs/version-7.0.x/api/hooks/USE_SOFT_INPUT_APPLIED_OFFSET_CHANGED.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: use-soft-input-applied-offset-changed | ||
title: useSoftInputAppliedOffsetChanged | ||
sidebar_label: useSoftInputAppliedOffsetChanged | ||
keywords: [react-native-avoid-softinput, useSoftInputAppliedOffsetChanged, react hooks] | ||
--- | ||
|
||
`useSoftInputAppliedOffsetChanged` is a shortcut for using `AvoidSoftInput.onSoftInputAppliedOffsetChange` method inside `useEffect`. | ||
|
||
### Parameters | ||
|
||
| Type | Required | Description | | ||
| ---------------------------------------------------------- | -------- | --------------------------------------------------------------------------------- | | ||
| (\{ appliedOffset \}: \{ appliedOffset: number \}) => void | yes | function called during applying padding or translation with current applied value | | ||
|
||
### Example | ||
|
||
```ts | ||
import { useSoftInputAppliedOffsetChanged } from "react-native-avoid-softinput"; | ||
|
||
useSoftInputAppliedOffsetChanged(({ appliedOffset }) => { | ||
// Do sth | ||
}); | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/versioned_docs/version-7.0.x/api/hooks/USE_SOFT_INPUT_HEIGHT_CHANGED.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: use-soft-input-height-changed | ||
title: useSoftInputHeightChanged | ||
sidebar_label: useSoftInputHeightChanged | ||
keywords: [react-native-avoid-softinput, useSoftInputHeightChanged, react hooks] | ||
--- | ||
|
||
`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 | ||
|
||
```ts | ||
import { useSoftInputHeightChanged } from "react-native-avoid-softinput"; | ||
|
||
useSoftInputHeightChanged(({ softInputHeight }) => { | ||
// Do sth | ||
}); | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/versioned_docs/version-7.0.x/api/hooks/USE_SOFT_INPUT_HIDDEN.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
id: use-soft-input-hidden | ||
title: useSoftInputHidden | ||
sidebar_label: useSoftInputHidden | ||
keywords: [react-native-avoid-softinput, useSoftInputHidden, react hooks] | ||
--- | ||
|
||
`useSoftInputHidden` is a shortcut for using `AvoidSoftInput.onSoftInputHidden` method inside `useEffect`. | ||
|
||
### Parameters | ||
|
||
| Type | Required | Description | | ||
| ---------- | -------- | ----------------------------------------- | | ||
| () => void | yes | function called when soft input is hidden | | ||
|
||
### Example | ||
|
||
```ts | ||
import { useSoftInputHidden } from "react-native-avoid-softinput"; | ||
|
||
useSoftInputHidden(() => { | ||
// Do sth | ||
}); | ||
``` |
Oops, something went wrong.