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
I'm currently having an issue after updating my version of react-json-schema.
Before that, I could create a radio element with a list of object in enum, and a default object to initialize.
Since I've updated to 5.24.x, if the default value is an object, I can't select other option in the rendered Radio Element. I have to delete the default from jsonSchema to make it works.
Do you have any idea to get a default value with a list of object in enum ?
Or is that a bad practice and this is something you don't allow anymore ?
Expected Behavior
Select other item in rendered view when I've set a default value with an object
I encountered the same issue. Upon searching, I found out that this comes from here, where the condition should be overrideFormDataWithDefaults && (keyExistsInDefaults && !keyExistsInFormData) (instead of the ||). However, upon working on making a PR, it seems to break some tests, so I guess this have quite a lot of impacts.
I encountered the same issue. Upon searching, I found out that this comes from here, where the condition should be overrideFormDataWithDefaults && (keyExistsInDefaults && !keyExistsInFormData) (instead of the ||). However, upon working on making a PR, it seems to break some tests, so I guess this have quite a lot of impacts.
Thanks !
So I'll wait a few days to see if contributors respond, otherwise I'll maybe search a solution with what you've tried to do too :)
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
What theme are you using?
core
Version
5.24.x
Current Behavior
I'm currently having an issue after updating my version of react-json-schema.
Before that, I could create a radio element with a list of object in enum, and a default object to initialize.
Example :
Since I've updated to 5.24.x, if the default value is an object, I can't select other option in the rendered Radio Element.
I have to delete the default from jsonSchema to make it works.
Do you have any idea to get a default value with a list of object in enum ?
Or is that a bad practice and this is something you don't allow anymore ?
Expected Behavior
Select other item in rendered view when I've set a default value with an object
Steps To Reproduce
You can test it in :
https://rjsf-team.github.io/react-jsonschema-form/
-> Enumerated Objects
-> just add this in properties -> locationRadio
"default": { "name": "New York", "lat": 40, "lon": 74 }
And try to select Amsterdam on the rendered part.
You can't
Environment
Anything else?
(can't select Amsterdam on right part after adding a default value)
The text was updated successfully, but these errors were encountered: