react-native-table-component icon indicating copy to clipboard operation
react-native-table-component copied to clipboard

Invalid prop textStyle of type array supplied to Cell, expected object.

Open techiekarthick opened this issue 3 years ago • 2 comments

ERROR Warning: Failed prop type: Invalid prop textStyle of type array supplied to Cell, expected object.

I'm facing same issue at this version "react-native-table-component": "^1.2.2";

const rowTextStyle = { color: 'red' }; textStyle={rowTextStyle}

Anybody know the answer ? I'm giving object only.. why it showing again expected object ?

techiekarthick avatar Dec 16 '22 07:12 techiekarthick

We encountered the same issue, the fix is this:

  1. Go to components/cell.js
  2. Change line 8 from textStyle: PropTypes.object, to textStyle: PropTypes.array,

Eli-Levi avatar Dec 25 '22 19:12 Eli-Levi

Hey, I had rewrote it in typescript and I'll optimizing it in react-native-reanimated. react-native-reanimated-table 🌴

BTW these problems are solved.

dohooo avatar Apr 28 '23 03:04 dohooo