Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

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

Open
yagnesh97 opened this issue Dec 29, 2022 · 3 comments

Comments

@yagnesh97
Copy link

Hi! 馃憢

Firstly, thanks for your work on this project! 馃檪

Today I used patch-package to patch react-native-table-component@1.2.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-table-component/components/rows.js b/node_modules/react-native-table-component/components/rows.js
index 40cecc6..b096fe4 100644
--- a/node_modules/react-native-table-component/components/rows.js
+++ b/node_modules/react-native-table-component/components/rows.js
@@ -26,7 +26,8 @@ export class Row extends Component {
               width={wth}
               height={height}
               flex={flex}
-              textStyle={[cellTextStyle && cellTextStyle(item), textStyle]}
+              // textStyle={[cellTextStyle && cellTextStyle(item), textStyle]}
+              textStyle={{...(cellTextStyle ? cellTextStyle(item) : {}), ...textStyle}}
               {...props}
             />
           );

This issue body was partially generated by patch-package.

@dohooo
Copy link
Owner

dohooo commented Apr 28, 2023

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.

@YovanggaAnandhika
Copy link

react-native-reanimated-table

the link repository is missing buddy ?

@dohooo
Copy link
Owner

dohooo commented Apr 28, 2023

react-native-reanimated-table

the link repository is missing buddy ?

I haven't published it to GitHub yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants