Default value generation #2750
Answered
by
epicfaace
dieseldjango
asked this question in
Q&A
Replies: 4 comments
-
I don't think so, at the moment.
…--
Ashwin Ramaswami
On Tue, Mar 8, 2022 at 12:34 PM David Johnson ***@***.***> wrote:
I've been working some more with the form and it appears that it
automatically generates default values for properties missing in the input
data if provided by the schema. This seems to make sense and to be useful
when the form is used for editing. However, my initial use case for this
form is to present a read-only view of the data. When the data is missing a
value, the default is presented, which is misleading.
Is there a way to turn off the default value generation?
—
Reply to this email directly, view it on GitHub
<#2750>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4MX4AFZKRP4CZHXOSOW3U66FSJANCNFSM5QHAL5KQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
You could modify the schema before passing it into the form by removing all
`default` keys?
…--
Ashwin Ramaswami
On Tue, Mar 8, 2022 at 1:57 PM Ashwin Ramaswami ***@***.***>
wrote:
I don't think so, at the moment.
--
Ashwin Ramaswami
On Tue, Mar 8, 2022 at 12:34 PM David Johnson ***@***.***>
wrote:
> I've been working some more with the form and it appears that it
> automatically generates default values for properties missing in the input
> data if provided by the schema. This seems to make sense and to be useful
> when the form is used for editing. However, my initial use case for this
> form is to present a read-only view of the data. When the data is missing a
> value, the default is presented, which is misleading.
>
> Is there a way to turn off the default value generation?
>
> —
> Reply to this email directly, view it on GitHub
> <#2750>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAM4MX4AFZKRP4CZHXOSOW3U66FSJANCNFSM5QHAL5KQ>
> .
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
dieseldjango
-
Thanks for the answer. I'll look at stripping defaults for now and maybe submit a PR later to support disabling the feature if I find time. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks!
…--
Ashwin Ramaswami
On Tue, Mar 8, 2022 at 2:09 PM David Johnson ***@***.***> wrote:
Thanks for the answer. I'll look at stripping defaults for now and maybe
submit a PR later to support disabling the feature if I find time.
—
Reply to this email directly, view it on GitHub
<#2750 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4MX7WU44AUZMGHWZCCLLU66QWRANCNFSM5QHAL5KQ>
.
You are receiving this because you commented.Message ID:
<rjsf-team/react-jsonschema-form/repo-discussions/2750/comments/2319006@
github.com>
|
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
-
I've been working some more with the form and it appears that it automatically generates default values for properties missing in the input data if provided by the schema. This seems to make sense and to be useful when the form is used for editing. However, my initial use case for this form is to present a read-only view of the data. When the data is missing a value, the default is presented, which is misleading.
Is there a way to turn off the default value generation?
Beta Was this translation helpful? Give feedback.
All reactions