Support readOnly property from latest validation draft#888
Support readOnly property from latest validation draft#888norpan wants to merge 1 commit intorjsf-team:masterfrom
readOnly property from latest validation draft#888Conversation
|
Thanks for the PR, @norpan , can you please update the documentation in your PR as well? @handrews , I have a question, how does the json schema draft process work -- is draft-07 finalized and won't change? Since |
|
@epicfaace draft-07 is published and will not change. While technically there were two sets of IETF documents referred to as "draft-07" (draft-handrews-json-schema*-00 and draft-handrews-json-schema*-01) there were no differences in implementation requirements. Which is why we kept "draft-07" for both- the -01 documents were just bugfixes and clarifications. The whole thing where meta-schemas are called "draft-NN" and IETF documents are "draft-author-topic-NN" where the two values of NN don't match is way too confusing, so we will be moving to date-based meta-schema identifiers for the next draft. So instead of "draft-08", draft-handrews-json-schema*-02 will correspond to "draft/2019-02" or something like that. |
|
@norpan will you be able to update the doc? Once you do that, I can merge this PR. |
|
@norpan , just bumping this -- will you be able to update the docs? |
|
I would love to see this merged very soon since I'm desperately in need of it. |
| const disabled = Boolean(props.disabled || uiSchema["ui:disabled"]); | ||
| const readonly = Boolean(props.readonly || uiSchema["ui:readonly"]); | ||
| const readonly = Boolean( | ||
| props.readonly || uiSchema["ui:readonly"] || schema["readOnly"] |
There was a problem hiding this comment.
| props.readonly || uiSchema["ui:readonly"] || schema["readOnly"] | |
| props.readonly || uiSchema["ui:readonly"] || props.schema.readOnly || schema.readOnly |
To be consistent with the changes done in 497620f
|
This can be closed now @epicfaace |
|
Yes. Closing because of PR #1282 |
Reasons for making this change
Since the
readOnlyproperty now is available in the latest validation draft (previously it was in hyper schema only), it makes sense to use this property to signal read only for fields.Fixes #976
Checklist
npm run cs-formaton my branch to conform my code to prettier coding style