Comments (3)
@memchenko I've created an example using your schema with a UiSchema
that sets the title
. I believe that you can do the same for yours only use widget
instead. So something like:
{
a: {
"ui:widget": "buttonGroup"
},
b: {
"ui:widget": "phone",
}
}
from react-jsonschema-form.
@heath-freenome Hi, thank you for your response! The example you created contains a couple of problems I try to solve. First problem is that widget for a
property doesn't get all the possible options. Here you can see the the select has not any option:
And the second problem is that there appears the dropdown on the top with options "Option 1" and "Option 2" which allows to switch between schemas. However, I'd like it to work the way dependencies
definition works. Meaning when user selects an option in the dropdown for the a
property a corresponding subschema applies. This is what I get with this approach so far though:
For illustration I tweaked your example, you can check it here
from react-jsonschema-form.
@memchenko I think the issue here is that we don't have great support for the const
keyword (see #1241)
If you replace the const
with oneOf
/const
(or enum
) it should be closer to what you expect. Here's a playground link.
from react-jsonschema-form.
Related Issues (20)
- Select bug when multiple oneOf are nested HOT 2
- How can I cite this? HOT 6
- Validation error when multiple $ref references point to a single definition HOT 4
- not working about validation HOT 3
- Passing ui options down to array items HOT 3
- MUI number input label UI issue with non-numeric input HOT 1
- Publish v6 release candidate with support for Bootstrap 5 HOT 1
- Can not replace "integer" widget HOT 4
- Omit Extra Data not behaving as expected on submit for allOf (if then) schemas along with additionalProperties set to false blocking form submission HOT 2
- `anyOf` form validation error messages confusing when `anyOf` items contain properties found in other items HOT 4
- How to reference an array field from an enum field? HOT 1
- Array Length dependant on FormContext Value HOT 1
- Add support for tremor UI library HOT 2
- Issue with data of files array when we have validation required and minItems HOT 1
- Issue with omit extra data and live omit not working onSubmit HOT 1
- use allOf schemas with additionalProperties, when change allof ,I don't want the data value of the previous anyof HOT 1
- Using SchemaField when upgrading from v4 to v5 HOT 1
- Custom widget access to form Data HOT 3
- Form Layout HOT 1
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 react-jsonschema-form.