Closed chrisdrackett closed 3 years ago
@chrisdrackett I will take a look at your PR this evening. In the meantime, if at all possible, could you share a code/screenshot example of a styling you're not able to accomplish without this?
For example I want my flatlist to have flex: 1
. For this to work it needs to be both on the wrapper and the FlatList
.
I also like to add padding on the top and bottom of the scrolling content of a FlatList
and this is only possible if I have access to its styles
Thanks for clarifying. I want to mess around with this some to refresh my memory before I review the PR. I'll try to tackle it this weekend.
I've been working on the older issues/PRs first and haven't gotten to this one yet, but I have not forgotten about it. I still want to experiment a bit and understand the problem space more deeply. For example, if we add a prop to pass through to the FlatList
's style
, we might also want one to pass through to its contentContainerStyle
.
agreed, I think the more that can be accessed on the native FlatList
the better
Now that I have revisited this, I realized my previous comment above is a bit foolish because we can already pass contentContainerStyle
through. DraxList
accepts all the props of a FlatList
and passes through the ones that it doesn't modify or generate.
It would be ideal to me if there were some way to make the wrapping view almost "invisible" for the sake of styling and layouts, only relying on the FlatList
's style and passing the prop directly to it. Unfortunately I don't think this is easily achievable. My current preference is to have a new DraxList
prop named something like listStyle
and pass it to the underlying FlatList
as its style
prop.
Merged in #91, new DraxList
prop is flatListStyle
, and it will be in the 0.8.0 release tonight or tomorrow.
to have full control over the styles of this component I think it is currently needed to be able to pass styles both to the
FlatList
and to theDraxList
. For example if I want to add padding to inside theFlatList
or have effectivelyflex: 1
it is needed to add styles to both elements.