Comments (3)
The example of a scheme:
{
type: 'object',
properties: {
informationMethod: {
type: 'object',
title: 'Способ информирования о готовности результатов услуги',
oneOfFieldName: 'id',
oneOfFieldTitle: 'Способ информирования о готовности результатов услуги',
oneOf: [
{
type: 'object',
title: 'По электронной почте',
id: 'Email',
properties: {
Email: {
title: 'Адрес электронной почты',
type: 'string',
},
},
required: ['Email'],
},
{
type: 'object',
title: 'По телефону',
id: 'Phone',
properties: {
Phone: {
title:
'Номер телефона (10 цифр без восьмёрки и дополнительных обозначений)',
type: 'string',
},
},
required: ['Phone'],
},
],
},
},
}
from reagent-js.
In this case we have same key-names into oneOf-objects:
{
type: 'object',
title: 'Способ предоставления результата оказания услуги',
oneOfFieldName: 'issue_method',
oneOfFieldTitle: 'Способ предоставления результата оказания услуги',
oneOf: [
{
type: 'object',
title: 'По электронной почте',
id: 'Email',
properties: {
issue_place_id: {
title: 'Адрес электронной почты',
type: 'string',
},
},
required: ['issue_place_id'],
},
{
type: 'object',
title: 'МФЦ',
id: 'MFC',
properties: {
issue_place_id: {
title: 'Офис МФЦ',
type: 'radio',
items: mfcOffices,
},
},
required: ['issue_place_id'],
},
],
}
In this case we don't use auto substitution from the property value from <Form />
.
And we use resulting issue_method
and issue_place_id
from data as special attributes of a case.
The problem
If we fill the second radio-field, then check at the first email-input,
we have the value from the second field into the first input (a some id
, 64
for example, in our case).
from reagent-js.
@irrbd The most reasonable solution in this case is change scheme to
{
type: 'object',
title: 'По электронной почте',
id: 'Email',
properties: {
email: {
title: 'Адрес электронной почты',
type: 'string',
},
},
required: ['email'],
},
{
type: 'object',
title: 'МФЦ',
id: 'MFC',
properties: {
office_id: {
title: 'Офис МФЦ',
type: 'radio',
items: mfcOffices,
},
},
required: ['office_id'],
},
],```
and handle result
from reagent-js.
Related Issues (20)
- Add empty values into result data HOT 2
- Ограничение к полю типа array
- Fix value that returns from field of type 'file'
- Add 'accept' option to 'file' field
- Add export of Field from 'react-final-form' package
- Add different formats of value that's returned from field of type 'file'
- Fix the error occurs when we don't transfer a value into the Form-component for an object-field HOT 1
- Add the key-value pair into data from the oneOf-field
- Add the ability to set necessarily the "Array" field
- Implement hint
- Implement the opening of the modal window by clicking on the field.
- Get rid of console errors.
- Change the return value for the type "toggle".
- Set autofocus for required fields.
- Fix requirement of the address-field HOT 3
- Add russian localization for the `date` field
- Add the special field for email
- Fix the displayed filename for a field of type `file`
- Add a message indicating that the checkbox field is invalid
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reagent-js.