Providing Form with new schema with updated property appears to have no effect in specific case.
See original GitHub issueDescribe the bug
I am attempting to have a schema property start as <input type=text />
and change to <select />
after an async call is completed. I am essentially looking to achieve this effect in the gif below:
- ❌ Providing new
schema
property to<Form />
component seems to have no effect if changing a property from{ type: 'string' }
to{ type: 'string', oneOf: [] }
(<input type=text />
to<select />
). - ✅ If the property name changes between schema updates the UI will update.
- ✅ If the Form is unmounted between the schema updates the form UI will update.
To Reproduce
Please see this CodeSandbox for code that reproduces the behavior I described. In the CodeSandbox I am switching between two schemas every second, but only the <input type="text" />
is rendered. See the console for when these updates are occurring since it can kind of look like just a static page.
I have achieved the effect in the gif above by changing the property name from model
to modelz
(see second ✅ above).
Should this work this way or is this functioning as expected?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Applying Subschemas Conditionally - JSON Schema
The dependentRequired keyword conditionally requires that certain properties must be present if a given property is present in an object.
Read more >Database Project Settings - SQL Server Data Tools (SSDT)
This check box has no effect if the Always re-create database check box is selected, because the database will be dropped. Do not...
Read more >Configuration schema/metadata - Drupal
So when this schema is applied to the data, image. effect. image_scale is the actual type referenced.
Read more >OpenAPI Specification - Version 3.0.3 - Swagger
All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the...
Read more >Getting started with Schema Registry - AWS Glue
The following sections provide an overview and walk you through setting up and ... Glue Schema Registry APIs, make sure to update your...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok also if your curious for conditional schema stuff there may be stuff you need here: https://teslamotors.github.io/informed/?path=/story/conditionals--conditional-props-schema
Feel free to close - we can work around unless you see this as a feature you want to work to add 👍