-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Setting custom colors for Separators in custom components #784
Comments
Can confirm the Bug, also I have the problem that hideSeparator does not work with custom component:
|
Please see my comment in the PR @CosmicClownTyler #785 (comment) It's basically what you already pointed out. |
I extended the README: https://github.com/Purii/react-native-tableview-simple?tab=readme-ov-file#wrap-cell I'm currently thinking about the following idea: Drill down through the children of the I would be open for a pull request implementing this. I currently don't have the time to dig deep into figuring out an official way to determine the type of a component. I want to prevent having hackie workarounds to keep the maintenance effort as low as possible. |
That's sure the best way to solve the problem, but it is beyond my capabilities, sorry. |
While using
<TableView>
I was constantly adding a specific set of custom props to my<Section>
s and<Cell>
s, so I decided to extend them using custom components to simplify this process for myself. (This was just a different way of achieving the same effect of creating and exporting an object with custom props)However, in doing so, the colors of the separator insets reverted back to the default colors. After some exploring, including looking at this past issue, I discovered that the background color that is defined in the custom component is used to color the cell but not the separator inset.
This can be seen in the image below, with code written in a snack here.
The problem can be easily circumvented by simply using an object of reusable custom props instead of defining custom components, or by overwriting the component's background color (both options are shown in the snack), but I thought I would submit an issue so this can be fixed if any devs have time, and to also help out anyone else that runs into this issue.
The text was updated successfully, but these errors were encountered: