dohooo / react-native-table-component

🌱Build table for react native
MIT License
730 stars 188 forks source link

Error while updating property 'borderStyle' of a view managed by: RCTView #121

Open AnasAlamin opened 4 years ago

AnasAlamin commented 4 years ago

I've updated my library and i tried to use borderStyle property but it's giving me this error on Android!

Error while updating property 'borderStyle' of a view managed by: RCTView

abi37_0_0.com.facebook.react.bridge.ReadableNativeMap cannot be cast to java.lang.String

wsamipw commented 3 years ago

Encountered same issue while replacing data.map with FlatList

<Table borderStyle={styles.borderStyle}>
  <Row
    data={state.tableHead}
    style={styles.head}
    textStyle={[styles.text, styles.headText]}
  />
</Table>
<View style={styles.dataWrapper}>
  <Table borderStyle={styles.borderStyle}>
      <FlatList
        data={state.data}
        renderItem={({item, index}) => (
          <Row
            key={index}
            data={item}
            style={[
              styles.row,
              index % 2 && {backgroundColor: '#F7F6E7'},
            ]}
            textStyle={styles.text}
          />
        )}
        keyExtractor={item => item}
      />
  </Table>
 </View>
SKYDA commented 3 years ago

have an update on the case?

tqloc0311 commented 2 years ago

Make sure the length of data that renders rows is larger than zero. { data.length > 0 && <Table... }