-
Notifications
You must be signed in to change notification settings - Fork 117
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
Question: How to allow only certain fields of Json being editable ? #348
Comments
There is currently no good way to do something like that. You can make specific fields read-only or customize how they are rendered using It would be nice to have better control over this though, we could work out a plan for that. Related: #342 |
Thanks for your answer, Jos. I agree the user can work around by editing the key, changing the value then again renaming the key, but can't we disable the editing of keys altogether. |
and please tell me how to get rid of context Menu. edit:
|
There is no preferred way for this kind of customization :). Your CSS will indeed prevent the ContextMenu from opening (no guarantees though that this will keep working in the future). |
Thank you Jos and I disabled editing of keys by using pointer-events:none. |
Using vanilla-jsoneditor": "^0.19.0", for react
Let's take this json for example
{ "name" : "sample", "age" : "22", "address" : { "city" : "sample city", "country" : "sample country" } }
For a certain reason, I only want age and "address.country" to be editable and not other fields when I double click on it.
is there a way to achieve the same ?
Thanks
The text was updated successfully, but these errors were encountered: