dohooo / react-native-table-component

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

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

Open techiekarthick opened 1 year ago

techiekarthick commented 1 year ago

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 ?

Eli-Levi commented 1 year ago

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,

dohooo commented 1 year ago

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.