Open tran-simon opened 1 month ago
This issue might be caused by PadView
not handling React.Fragment
correctly, which disrupts padding. I can work on this and investigate further. Assign the issue to me, I’ll be happy to work on it.
The solution I'm considering is to flatten the children using React.Children.toArray
to handle fragments properly.
hi @void-hr
I don't have the rights to edit the Assignees
hello @tran-simon, no worries I'll wait for maintainer to assign the issue to me. I am not sure though, looks inactive to me.
Is there an existing issue for this?
Explain what you did
this:
looks different than:
There is no spacing between the icon and the content when they are wrapped in a fragment
Expected behavior
Fragment should not affect the layout
Describe the bug
When wrapping the content of a ListItem element in a ReactFragment, the spacing between the elements is removed
Sandbox: https://snack.expo.dev/@simon.tran/rneui-listitem-bug
This is problematic, because there are cases where I would want to conditionnally render the listitem content
Steps To Reproduce
Screenshots
Your Environment
`npx @rneui/envinfo`
``` React Native Elements Env Info ## Global Dependencies: No related dependency found ## Local Dependencies: - @rneui/base : ^4.0.0-rc.7 - @rneui/themed : ^4.0.0-rc.8 - @types/react-native : ^0.70.15 - react : 18.2.0 - react-native : 0.71.19 ```