Skip to content

Commit ec912c0

Browse files
authored
fix: remove wrapper view from KeyboardAwareScrollView (#321)
## 📜 Description Removed view wrapper. Attached that view as last child + kept padding for this view. ## 💡 Motivation and Context The approach with additional view was added in #257 I don't remember exact reason, but for me it seems like it was added, because TExtInputs were not able to grow. However such approach is causing additional issues: - breaks styling in some cases - stickyHeaderIndices={[0]} produces a crash (because RN will try to attach `Animated`-based style to REA view) So in this PR I'm removing this view wrapper and apply additional padding in mostly the same way as it was before #257 (additional child-view in the end of ScrollView, but instead of `height` I'm animating `paddingBottom`). I've tested and it still works (i. e. inputs are growing). E2E tests also passing (so there seems to be 1px difference, which can be neglected, but i had to update assets to assure E2E tests consistency). > [!IMPORTANT] > This fix will introduce software-mansion/react-native-reanimated#5567. I've added that issue as "known issue" in docs page. I think it's better to have properly working paper architecture and Fabric can be fixed later (because it's still in early adoption and is not widely used). Closes #325 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### E2E - added `detox-clean` command (useful when you updated XCode version and haven't run detox tests yet) ### JS - removed wrapper and moved view as last child ## 🤔 How Has This Been Tested? Tested on: - e2e (Android, iOS - paper) - Pixel 7 Pro (Android 14, paper) ## 📸 Screenshots (if appropriate): There is no visual difference 🙂 ## 📝 Checklist - [x] CI successfully passed
1 parent 6f055c9 commit ec912c0

14 files changed

+12
-2
lines changed

docs/docs/api/components/keyboard-aware-scroll-view.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,7 @@ const styles = StyleSheet.create({
133133
},
134134
});
135135
```
136+
137+
## Known issues
138+
139+
- [react-native-reanimated#5567](https://github.com/software-mansion/react-native-reanimated/issues/5567): Resizing content inside `ScrollView` prevents multiline `TextInput` from growing in Fabric

docs/versioned_docs/version-1.10.0/api/components/keyboard-aware-scroll-view.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,7 @@ const styles = StyleSheet.create({
133133
},
134134
});
135135
```
136+
137+
## Known issues
138+
139+
- [react-native-reanimated#5567](https://github.com/software-mansion/react-native-reanimated/issues/5567): Resizing content inside `ScrollView` prevents multiline `TextInput` from growing in Fabric
29 Bytes
Loading
-6 Bytes
Loading
-1 Bytes
Loading
-7 Bytes
Loading
-1 Bytes
Loading
-3 Bytes
Loading
258 Bytes
Loading
61 Bytes
Loading

0 commit comments

Comments
 (0)