Skip to content

delayed setState on scrollable prop causes incorrect behaviour on android #669

@TheNerdGuyLulu

Description

@TheNerdGuyLulu

Before submitting a new issue

  • I tested using the latest version of the library.
  • I tested using a supported version of React Native.
  • I checked for existing issues that might answer my question.

Bug Summary

Context:

This library doesn't support 'auto' when scrollable. To fake the behaviour, we implemented a hook that if the content height is more than 85% of the available screen height, it will change the content wrapper component from View to ScrollView and apply the scrollable prop, and set the detent to 1.

On iOS seems to be working perfectly fine. Once the content is > 85% if expands to fullscreen and content becomes scrollable. On Android, the ScrollView is simply not scrollable. The content is rendered, but no scroll action or scroll indicator is displayed. It's possible to reproduce it using the last button on the Reproduction Repo (Open sheet (change From View to ScrollView))

Normal behaviour (expected behaviour, lacking the delayed setState)

The content has proper insets and is scrollable.
Image

Only ScrollView (with 2s delayed setState - scrollable prop)

The content is scrollable but no insets. The text is cut.
Image

Change between View to ScrollView (with 2s delayed setState - scrollable prop and conditional rendering)

The content is not scrollable. No scrollbar even render.
Image

Affected Platforms

  • iOS
  • Android
  • Web
  • Other

Library Version

3.10.1

Environment Info

System:
  OS: macOS 26.3.1
  CPU: (14) arm64 Apple M4 Max
  Memory: 121.08 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 24.10.0
    path: /Users/xxxxx/.nvm/versions/node/v24.10.0/bin/node
  Yarn:
    version: 3.6.4
    path: /Users/xxxxx/.nvm/versions/node/v24.10.0/bin/yarn
  npm:
    version: 11.6.1
    path: /Users/xxxxx/.nvm/versions/node/v24.10.0/bin/npm
  Watchman:
    version: 2026.01.12.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.4
      - iOS 26.4
      - macOS 26.4
      - tvOS 26.4
      - visionOS 26.4
      - watchOS 26.4
  Android SDK:
    API Levels:
      - "35"
      - "36"
      - "36"
    Build Tools:
      - 34.0.0
      - 35.0.0
      - 35.0.1
      - 36.0.0
      - 36.1.0
    System Images:
      - android-36.1 | Google APIs ARM 64 v8a
      - android-36.1 | Google Play ARM 64 v8a
      - android-36 | Google Play ARM 64 v8a
      - android-37.0 | Pre-Release 16 KB Page Size Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.32098.37.2534.15232325
  Xcode:
    version: 26.4.1/17E202
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.18
    path: /usr/bin/javac
  Ruby:
    version: 3.4.6
    path: /Users/xxxxx/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.3
    wanted: 20.1.3
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.85.2
    wanted: 0.85.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Steps to Reproduce

  1. Open the app
  2. Click on "open sheet"
  3. After 2 seconds the Sheet children will change from View to ScrollView
  4. Scrollview can't scroll

Repro

https://github.com/TheNerdGuyLulu/TrueSheetAndroidScrollableBugRepro

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrepro providedGood! Repro is provided

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions