-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the issue
When using the pagingEnabled
prop of ScrollView
, it is no longer possible to control the styles of children. I believe this is because, while there is a contentContainerStyle
prop on the component, it actually adds an additional layer of containers wrapping children when pagingEnabled
is true.
Expected behavior
I expect to be able to set style props on the children I provide to ScrollView
, and for the rendered view to act as if those props were applied.
Perhaps the wrapping view could copy style props from the child it wraps? I'm not sure how the implementation would be exactly, but as it stands there's a difference in how the component acts and looks, and what styling is even possible, depending on if the pagingEnabled
prop is set or not.
Steps to reproduce
- Set the
pagingEnabled
prop on anScrollView
- Observe that it is now impossible to manipulate layout of ScrollView children by setting props such as
height
,width
,flex*
etc. They are bounded to their minimum dimensions.
Test case
It is not possible to use that template: see below
Additional comments
The provided template for repro results in the following error when forked:
