Replies: 1 comment
-
Isn't updateMyData just a generic callback function - i think you can add whatever type you like to value - presumably the type of the value you are requesting in the get, it may be easier in typescript. What i am currently trying to understand is where old comes from - as setData is passed the new state for data, so... what value does old have? Its not declared anywhere so data is set undefined if i am not mistaken? Feel like it should be setData(value => etc |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
From this example for editable cell:
https://github.com/tannerlinsley/react-table/blob/master/examples/editable-data/src/App.js
If the value is an Int, once a new value is added, the new value turn into a string instead of Int. Is there a way to tell updateMyData what data type value is?
Beta Was this translation helpful? Give feedback.
All reactions