react-native-true-sheet
react-native-true-sheet copied to clipboard
4 bugs on ANDROID
Before submitting a new issue
- [x] I tested using the latest version of the library, as the bug might be already fixed.
- [x] I tested using a supported version of react native.
- [x] I checked for possible duplicate issues, with possible answers.
Bug summary
- "auto" size doesn't work when content inside scrollview dynamically added and height grows but sheet doesn't grows (works perfectly on iOS)
- sheet doesn't adjust view and doesn't expand when keyboard is open
- can't tap on input (doesn't focus)
- footer component doesn't render
Library version
2.0.5
Environment info
OS: macOS 15.3.2
CPU: (12) arm64 Apple M4 Pro
Memory: 124.59 MB / 24.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.14.0
path: ~/.nvm/versions/node/v22.14.0/bin/node
Yarn:
version: 1.22.22
path: ~/.nvm/versions/node/v22.14.0/bin/yarn
npm:
version: 11.1.0
path: ~/.nvm/versions/node/v22.14.0/bin/npm
Watchman:
version: 2025.02.17.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/lib/ruby/gems/3.4.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.2
- iOS 18.2
- macOS 15.2
- tvOS 18.2
- visionOS 2.2
- watchOS 11.2
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23726.103.2422.13016713
Xcode:
version: 16.2/16C5032a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.14
path: /usr/bin/javac
Ruby:
version: 3.4.2
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 17.0.0
wanted: ^17.0.0
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.7
wanted: 0.76.7
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Steps to reproduce
<TrueSheet
cornerRadius={14}
sizes={ ["auto"]}
edgeToEdge
scrollRef={scrollRef}
>
<ScrollView
ref={scrollRef}
showsVerticalScrollIndicator={false}
keyboardDismissMode="interactive"
nestedScrollEnabled={true}
automaticallyAdjustKeyboardInsets={true}>
<TextInput
ref={inputRef}
autoCapitalize={"none"}
spellCheck={false}
returnKeyType="none"
multiline={true}
/>
// some dynamic content
</ScrollView>
</TrueSheet>
Reproducible example repository
Did you found any workaround for the input focus?
@skaionedev i fixed it adding an absolute pressable that covers the input.
<>
<RNTextInput
{...rest}
/>
{isAndroid && (
<Pressable
onPress={() => {
if (disabled) return;
ctx.inputRef?.current?.focus();
}}
style={[
atoms.z_20,
atoms.absolute,
atoms.inset_0, // top, bottom,left,right: 0
atoms.w_full, // width : 100%
atoms.h_full, // height: 100%
]}
/>
)}
</>
@skaionedev Thanks for reporting this, I'm facing the same issue [issue 2]
Have you ever been able to find any workaround, fix, or patch for
2- sheet doesn't adjust view and doesn't expand when keyboard is open
Everything happens here too. Any updates or workaround?
any updates on this ?
I want to migrate from gorhom bottom sheet to this library or action sheet which one you guys prefer?
bump, getting the second issue on android as well
+1
I can't press any button inside truesheet on android for some reason.
I can't press any button inside truesheet on android for some reason.
I had to use RNGH pressables to get it working
I can't press any button inside truesheet on android for some reason.
I had to use RNGH pressables to get it working
Me too.
I am unable to press any button on Android. Has anyone fixed that without replacing the RNGH pressable?
Another workaround to get press events on Android is to use onPressOut or onPressIn instead of onPress (although the button would be pressed very quickly, giving very little time to any press animation to be shown). See https://github.com/lodev09/react-native-true-sheet/issues/163