You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The thing that I am trying to achieve is someting like this;
I have this prop named as deleteWithButton with the type of Boolean, and based on the value of this prop I want to render one specific column.
in App.js
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The thing that I am trying to achieve is someting like this;
I have this prop named as deleteWithButton with the type of Boolean, and based on the value of this prop I want to render one specific column.
in App.js
in Table.js
However, one I don't provide the prop deleteWithButton I get an error that says
"TypeError: Cannot read property 'id' of undefined"
I get it if the header does not exist at all it couldn't find the regarding id, but I don't know how to skip if the prop's not provided.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions