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

[Android] PullToRefreshViewAndroid child ListView not scrollable #4793

Closed
Ehesp opened this issue Dec 15, 2015 · 2 comments
Closed

[Android] PullToRefreshViewAndroid child ListView not scrollable #4793

Ehesp opened this issue Dec 15, 2015 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@Ehesp
Copy link
Contributor

Ehesp commented Dec 15, 2015

I have a basic example of a ListView, which has a parent PullToRefreshViewAndroid:

        return (
            <PullToRefreshViewAndroid
                refreshing={isRefreshing}
                onRefresh={this.onRefresh}
            >
                <ListView
                    dataSource={races}
                    renderRow={(row) => <Text>{row}</Text>}
                />
            </PullToRefreshViewAndroid>
        );

The outcome of this is that pull to refresh works, but the ListView is not scrollable. The only way to fix this is by applying style={{flex:1}} to PullToRefreshViewAndroid... Is this a bug or intentional? I'd expect PullToRefreshViewAndroid to take the full height of it's child by default?

If it's a bug, I can potentially submit a PR for this.

@facebook-github-bot
Copy link
Contributor

Hey Ehesp, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

@skevy skevy added the Android label Dec 15, 2015
@ide
Copy link
Contributor

ide commented Dec 15, 2015

Could you send a PR mentioning in the docs that flex:1 is required?

ghost pushed a commit that referenced this issue Dec 16, 2015
Summary:
As mentioned in #4793 it is not initially clear that the PullToRefreshViewAndroid component needs the `{flex: 1}` style in order for it's child component to function correctly (without examining the example). This will hopefully clear that up.
Closes #4814

Reviewed By: svcscm

Differential Revision: D2764534

Pulled By: androidtrunkagent

fb-gh-sync-id: ae1c529342e85f8348b4f683e42bf25df5dbea09
@Ehesp Ehesp closed this as completed Dec 22, 2015
@facebook facebook locked as resolved and limited conversation to collaborators Jul 20, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants