react-native-tableview
react-native-tableview copied to clipboard
Table not visible in Dark Mode
Using the (corrected) simple example from https://github.com/aksonov/react-native-tableview/issues/214#issuecomment-631751644:
<View style={{ flex: 1 }}>
<TableView style={{ flex: 1 }} >
<Section label="Section 1">
<Item key={1}>Item 1</Item>
<Item key={2}>Item 1</Item>
<Item key={3}>Item 1</Item>
<Item key={4}>Item 1</Item>
<Item key={5}>Item 1</Item>
<Item key={6}>Item 1</Item>
<Item key={7}>Item 1</Item>
</Section>
</TableView>
</View>
the items are not visible except for the section header and the separators as shown in the screenshot below. When you touch an item, it appears in dark (reverse) color, as shown in the second screenshot.
I tried adding the transparent prop to the <Item> as suggested in #210, but that has no effect.


UPDATE: I built the example app and the entire app is blank in Dark Mode. (In the Simulator, go to Settings/Developer and turn on Dark Appearance)
WORKAROUND:
From Apple's Document: If you need extra time to work on your app's Dark Mode support, you can temporarily opt out by including the UIUserInterfaceStyle key (with a value of Light) in your app’s Info.plist file. Setting this key to Light causes the system to ignore the user's preference and always apply a light appearance to your app.
This applies if you're building with Xcode 11. If you're building with Xcode 10, this is not necessary.
@chetstone Do you have any idea of the kind of work needed to support dark mode?
Can you not write a custom cell and set your light/dark mode colors that way?
@chetstone Do you have any idea of the kind of work needed to support dark mode?
Sorry, I have no idea. Since discovering the workaround I described above, I have forgotten about this issue. The workaround is all I need for my app atm.