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

scrollEventThrottle has no effect on SectionList #18441

Closed
hugofelp opened this issue Mar 19, 2018 · 9 comments
Closed

scrollEventThrottle has no effect on SectionList #18441

hugofelp opened this issue Mar 19, 2018 · 9 comments
Labels
Bug Component: SectionList Component: VirtualizedList Priority: Low Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@hugofelp
Copy link

scrollEventThrottle doesn't seem to make any difference when applied to SectionList. It works as expected with ScrollView.

Environment

Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.2.1
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.2
react-native: 0.54.2 => 0.54.2

Steps to Reproduce

export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <ScrollView
          scrollEventThrottle={ 1000 }
          onScroll={ e => console.log( Date.now() ) }
        >
          <Text>ScrollView Text</Text>
        </ScrollView>


        <SectionList
          renderItem={ ( { item } ) => <Text>SectionList Text</Text> }
          sections={ [ {
            title: 'section title',
            data: [ 'item' ]
          } ] }
          scrollEventThrottle={ 1000 }
          onScroll={ e => console.log( Date.now() ) }
        />
      </View>
    );
  }
}

Expected Behavior

The events logged to the console should have at least 1000ms between them.

Actual Behavior

SectionList logs events at high rates regardless of the value passed to scrollEventThrottle

@react-native-bot react-native-bot added Lists 📜 Ran Commands One of our bots successfully processed a command. Platform: macOS Building on macOS. labels Mar 19, 2018
@hramos hramos removed the Platform: macOS Building on macOS. label Mar 29, 2018
@stale
Copy link

stale bot commented Jun 27, 2018

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 "For Discussion" or "Good first issue" 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 Jun 27, 2018
@chenghaoc
Copy link

I also had this issue when using React Native 0.55

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jul 17, 2018
@tangkunyin
Copy link

Is this problem solved now?

@stale
Copy link

stale bot commented Jan 16, 2019

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 "For Discussion" or "Good first issue" 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 Jan 16, 2019
@hugofelp
Copy link
Author

I don't know stale bot! I don't know...

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 16, 2019
@hramos hramos removed the Bug Report label Feb 6, 2019
@grabbou
Copy link
Contributor

grabbou commented Mar 19, 2019

I see there's a todo note around scrollEventTrottle in VirtualizedList -> https://github.com/facebook/react-native/blob/master/Libraries/Lists/VirtualizedList.js#L921. Are you running this on Android by any chance?

CC: @sahrens do you happen to have some context into what's left there to support it and whether this issue could be related?

@BrodaNoel
Copy link
Contributor

This has effect even in <ScrollView>: https://snack.expo.io/rkgPA5FkH

@stale
Copy link

stale bot commented Sep 19, 2019

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 Sep 19, 2019
@stale
Copy link

stale bot commented Sep 26, 2019

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 Sep 26, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Component: SectionList Component: VirtualizedList Priority: Low Ran Commands One of our bots successfully processed a command. 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

7 participants