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

Fixes #issue18098 SectionList scrollToLocation #21577

Conversation

melina7890
Copy link

@melina7890 melina7890 commented Oct 8, 2018

Fixes #18098

Test Plan:

Scrolling to the last section android
scroll-to-lastsection-android

Scrolling to the last section ios
scroll-to-lastsection-ios

Scrolling to the section index 1, item index 0 android
scroll-to-sectionindex1-itemindex0-android

Scrolling to the section index 1, item index 0 ios
scroll-to-sectionindex1-itemindex0-ios
Release Notes:

Changelog:

[IOS] [BUGFIX] [VirtualizedSectionList.js] - Changed indexing depending on platform to fix overscrolling.

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 8, 2018
@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Jan 22, 2019
@cpojer
Copy link
Contributor

cpojer commented Jan 22, 2019

Thank you for this PR.

@cpojer cpojer force-pushed the bug-sectionlist-scrolltolocation branch from d3cf10c to 3e82f11 Compare January 22, 2019 14:18
@cpojer cpojer changed the base branch from 0.57-stable to master January 22, 2019 14:19
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

  • eslint found some issues.
  • flow found some issues.

@@ -145,7 +146,7 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
sectionIndex: number,
viewPosition?: number,
}) {
let index = params.itemIndex + 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prettier/prettier: Replace ?·params.itemIndex with ·?·params.itemIndex·

@@ -145,7 +146,7 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
sectionIndex: number,
viewPosition?: number,
}) {
let index = params.itemIndex + 1;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space-infix-ops: Infix operators must be spaced.

@@ -10,6 +10,7 @@
'use strict';

const React = require('React');
const Platform = require('../Utilities/Platform');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cannot resolve module ../Utilities/Platform.

@pull-bot
Copy link

Warnings
⚠️

📋 Changelog - This PR appears to be missing Changelog.

Generated by 🚫 dangerJS

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@cpojer
Copy link
Contributor

cpojer commented Jan 22, 2019

This PR is causing some headaches for some reason. I'm trying some git magic to put it all back together on top of master to be able to land it.

@react-native-bot
Copy link
Collaborator

@cpojer merged commit f66e8eb into facebook:master.

@facebook facebook locked as resolved and limited conversation to collaborators Jan 22, 2019
@react-native-bot react-native-bot added the Merged This PR has been merged. label Jan 22, 2019
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
matt-oakes pushed a commit to matt-oakes/react-native that referenced this pull request Feb 7, 2019
Summary:
Fixes facebook#18098
Pull Request resolved: facebook#21577

Differential Revision: D13761884

Pulled By: cpojer

fbshipit-source-id: a096d69c589815d00754427fb575de0d8d0b595f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SectionList] scrollToLocation scrolls past content on iOS
7 participants