callstack / callstack/react-native-pager-view

Keyboard Aware Scroll View not working if inside Pager View

Open
#504 0 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
TypeScript
Stars
3.4k
Forks
476
Avg merge
10d 21h
Merged PRs (30d)
2

Description

## Keyboard Aware Scroll View is not working inside Pager View

Hi,
I have trouble when I use KASV inside Pager View. I have component using Pager View. Inside pager view I have another component (link.component).
```

{links.map((link, index) => {
return (

{link.isScrollable ? (

{link.component}

) : (
link.component
)}

);
})}

```
and the link.component looks more or less like:
```


AAAA








```
I observe two situations:
1. when I put height to Pager View style ``` style={[flex: 1, { height }]} ``` I can tap once in TextInput to show keyboard, but KeyboardAwareScrollView don't scroll to TextInput (show TI above keyboard). It seems KeyboardAwareScrollView doesn't work at all.
2. when I don't put height to Pager View style ``` style={[flex: 1]} ``` In this case I have to tap twice in TextInput to focus it and show keyboard, but in this case KeyboardAwareScrollView working properly and scrolling focused TextInput above keyboard.

Is this possible to work correctly Pager View and KeyboardAwareScrollView together? As I know KeyboardAwareScrollView need style={flex: 1} in parent component.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.