react-native-tableview icon indicating copy to clipboard operation
react-native-tableview copied to clipboard

Table not visible in Dark Mode

Open chetstone opened this issue 5 years ago • 5 comments

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. image

image

chetstone avatar May 20 '20 22:05 chetstone

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)

chetstone avatar May 20 '20 22:05 chetstone

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 avatar May 20 '20 22:05 chetstone

@chetstone Do you have any idea of the kind of work needed to support dark mode?

iRoachie avatar Jan 04 '21 15:01 iRoachie

Can you not write a custom cell and set your light/dark mode colors that way?

zachgibson avatar Feb 01 '21 18:02 zachgibson

@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.

chetstone avatar Feb 01 '21 20:02 chetstone