Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug - Can not disable Bounce in ScrollView when Horizontal=true #28808

Closed
stephanoparaskeva opened this issue May 2, 2020 · 6 comments
Closed
Labels
Component: ScrollView Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@stephanoparaskeva
Copy link

stephanoparaskeva commented May 2, 2020

I need to create a component that is Horizontally scrollable. However you cannot stop vertical bouncing, when you just want horizontal scrollability.

Despite this, the docs say:

alwaysBounceVertical
When true, the scroll view bounces vertically when it reaches the end 
even if the content is smaller than the scroll view itself. The default value 
is false when horizontal={true} and true otherwise.
    <ScrollView
      horizontal={true}
      onScrollEndDrag={increment}
      alwaysBounceVertical={false}
      bounces={false}
      showsHorizontalScrollIndicator={false}
      contentContainerStyle={{ flex: 1 }}
      style={{ flex: 1 }}>
      <View style={styles.container}>
        <TimeTableView
          events={events_data}
          firstHour={0}
          finalHour={25}
          titleCutoff={1}
          pastFutureIterator={iteration}
          numOfCalendarDays={7}
          onEventPress={onEventPress}
          headerStyle={styles.headerStyle}
        />
      </View>
    </ScrollView>

ezgif com-video-to-gif (4)

Am not able to disable bouncing effect, or the movement that you see. It should be optional to disable.

Ver: 0.62
Info

info Fetching system and libraries information...
System:
    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
    Memory: 21.36 MB / 16.00 GB
    Shell: 5.8 - /usr/local/bin/zsh
  Binaries:
    Node: 13.12.0 - ~/.nvm/versions/node/v13.12.0/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v13.12.0/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.3
      System Images: android-29 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6392135
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_252 - /usr/bin/javac
    Python: 2.7.17 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Even with these props, nothing changes for vertical

      bounces={false}
      alwaysBounceVertical={false}
      scrollEnabled={false}
      bouncesZoom={false}

Steps to replicate:

  1. Make any ScrollView
  2. add content to the ScrollView
  3. add prop 'Horizontal' to ScrollView
  4. You can now no longer prevent vertical bouncing.
@react-native-bot react-native-bot added Needs: Author Feedback Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. and removed Needs: Triage 🔍 labels May 2, 2020
@github-actions
Copy link

github-actions bot commented May 2, 2020

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

@stephanoparaskeva
Copy link
Author

stephanoparaskeva commented May 2, 2020

⚠️ Missing Environment Information
ℹ️ Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

Provided info, someone should remove 'Needs: Attention' as it does not, need attention.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels May 2, 2020
@stephanoparaskeva stephanoparaskeva changed the title Can't disable vertical scroll or bounce in scroll view Bug - Can not disable Bounce in scroll view when Horizontal=true May 3, 2020
@stephanoparaskeva stephanoparaskeva changed the title Bug - Can not disable Bounce in scroll view when Horizontal=true Bug - Can not disable Bounce in ScrollView when Horizontal=true May 3, 2020
@chrisglein chrisglein added Component: ScrollView Needs: Triage 🔍 and removed Needs: Attention Issues where the author has responded to feedback. Needs: Environment Info Please run `react-native info` and edit your issue with that command's output. labels May 13, 2020
@tayguohong
Copy link

tayguohong commented May 14, 2020

I am also facing this issue when i trying to implement hide/show bottom tab bar in onScroll props. When it reached the end or top of the scroll view, it has a bouncing effect which will make the tab bar visible again at the end of scroll view, although it should be hidden actually. And I couldn't find any solution to disable this jumpy or bouncing effect.

@stale
Copy link

stale bot commented Aug 16, 2020

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Aug 16, 2020
@stale
Copy link

stale bot commented Aug 23, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Aug 23, 2020
@reuvenaor
Copy link

same issue RN 0.63.2

@facebook facebook locked as resolved and limited conversation to collaborators Oct 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: ScrollView Needs: Triage 🔍 Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants