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

SectionList yellowbox misleading #15772

Closed
GantMan opened this issue Sep 3, 2017 · 2 comments
Closed

SectionList yellowbox misleading #15772

GantMan opened this issue Sep 3, 2017 · 2 comments
Labels
Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@GantMan
Copy link
Contributor

GantMan commented Sep 3, 2017

Is this a bug report?

yes

Have you read the Contributing Guidelines?

yes

Environment

  1. react-native -v: react-native-cli: 2.0.1 & react-native: 0.47.2
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --version: 0.27.5

Then, specify:

  • Target Platform: iOS
  • Development Operating System: Mac OS X
  • Build tools: react-native run-ios

Steps to Reproduce

  1. Create a SectionList
  2. Add flexWrap: 'wrap' style to the contentContainerStyle
  3. See misleading yellowbox

Expected Behavior

SectionList doesn't support numColumns. So there should be no yellowbox telling me to add it.

(Write what you thought would happen.)

Actual Behavior

FlatList warning comes in with advice that is useless on SectionList. It also says it won't work, when it works just fine.
image

What should happen?

If we are going to add numColumns to SectionList, then the message should be different. If we are not, then the yellowbox shouldn't show.

warning(
flatStyles == null || flatStyles.flexWrap !== 'wrap',
'`flexWrap: `wrap`` is not supported with the `VirtualizedList` components.' +
'Consider using `numColumns` with `FlatList` instead.',

I'm happy to fix this depending on what the proper path for SectionList is. Also, I need to know why we're showing a warning saying it doesn't work, when it does. Let me know how to proceed in fixing!

@robbawebba
Copy link

@GantMan I'm glad you brought this up! I'm happy that the flexWrap css property still works even though we're warned not to use it, but I'm reluctant to use it in my app because of the warning. The react native team must've included this warning for a reason, right? I'm starting to see some wacky rendering behavior with the flexWrap property.

Does anyone know the reason for this warning?

@stale
Copy link

stale bot commented Nov 25, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. 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 Nov 25, 2017
@stale stale bot closed this as completed Dec 2, 2017
@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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

2 participants