Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent behavior for ui:widget hidden in different themes #2571

Closed
3 tasks
01jaraujo opened this issue Sep 29, 2021 · 1 comment
Closed
3 tasks

Inconsistent behavior for ui:widget hidden in different themes #2571

01jaraujo opened this issue Sep 29, 2021 · 1 comment
Labels

Comments

@01jaraujo
Copy link

01jaraujo commented Sep 29, 2021

Prerequisites

Description

I'm trying to hide an Object property and understand this feature is not supported per the docs:
Hiding widgets is only supported for boolean, string, number and integer schema types

But in the live playground I'm able to successfully hide the Object property which is what I need, this is feature intended? If not, I think it should be offered to easily hide data types other than boolean, string, number and integer schema types. Here's a link to the playground.

The object property is hidden with the default theme:
image

The issue I'm running into is moving to material-ui as the theme does not hide the Object property. I think not only should we be able to hide Object properties but that it should be consistent across all themes. Currently the default theme, antd, fluent-ui and bootstrap-4 support hiding the Object property but not with material-ui or sematic-ui.

The object property is not hidden:
Screen Shot 2021-09-29 at 12 04 23 PM

Is there any workaround available to achieve this behaviour?

Expected behavior

I expected to not be able to hide the Object property but does work but only in certain themes.

Actual behavior

The Object property is hidden in the live playground:

Here's the JSONSchema and UISchema I used in the playground:

  • JSONSchema
    { "title": "Test Form", "type": "object", "properties": { "prop1": { "$ref": "#/definitions/TestFormProp1" }, "prop2": { "$ref": "#/definitions/TestFormProp2" } }, "required": [ "prop1", "prop2" ], "definitions": { "TestFormProp1": { "title": "Prop 1", "type": "object", "properties": { "field1": { "title": "Field1", "type": "integer" }, "field2": { "title": "Field2", "type": "integer" } }, "required": [ "field1", "field2" ] }, "TestFormProp2": { "title": "Prop 2", "type": "object", "properties": { "field3": { "title": "Field3", "type": "integer" }, "field4": { "title": "Field4", "type": "integer" } }, "required": [ "field3", "field4" ] } } }
  • UISchema
    { "prop2": { "ui:widget": "hidden" } }
@heath-freenome
Copy link
Member

Fixed in v5 beta via #3036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants