-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to update the new value to state ? #6
Comments
@liu-wh Provides a const data = {
string: 'Lorem ipsum dolor sit amet',
integer: 42,
float: 114.514,
object: {
'first-child': true,
'second-child': false,
'last-child': null,
'child': {
'first': true,
'second': false,
'last': null,
},
},
nestedArray: [ [1, 2], [3, 4], { a: 1} ],
} onEdit={(opts) => {
console.log('opts:', opts)
// opts.namespace: ['object', 'child', 'last']
// ['nestedArray', 0, 1]
// opts.oldValue: null
// opts.type: "value"
// opts.value: "NULL3"
return true;
}} E.g:
E.g:
|
@jaywcjlove thanks for your update ! |
@liu-wh Upgrade |
@jaywcjlove v1.8.3 is ok, thanks |
onEdit method seems to only provider newValue, oldValue, if don't have key, how can I update the state?
I want to use this component as a form component, so that users can edit json, submit the form, I need to use state to collect the json input by the user
The text was updated successfully, but these errors were encountered: