question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Providing Form with new schema with updated property appears to have no effect in specific case.

See original GitHub issue

Describe 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:

informed-schema-update

  • ❌ 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:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
joepuzzocommented, May 20, 2022

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

0reactions
shelbyspeeglecommented, May 17, 2022

Feel free to close - we can work around unless you see this as a feature you want to work to add 👍

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found