Skip to content

mapStateToJsonFormsRendererProps should map enabled property just like react own version of the method #1884

Closed
@kchobantonov

Description

@kchobantonov

Describe the bug

Currently when using different render set than react the enabled property is not preserved.

For example if we use the vuetify render set in this example (https://jsonforms-vuetify-renderers.netlify.app/#/example/main) - the "Address for Shipping T-Shirt" section is never disabled per committer checkbox.

Here is the relevant part of the react renderer set that does not use the core version of mapStateToJsonFormsRendererProps

const useJsonFormsDispatchRendererProps = (props: OwnPropsOfJsonFormsRenderer & JsonFormsReactProps) => {
const ctx = useJsonForms();
return {
schema: props.schema || ctx.core.schema,
uischema: props.uischema || ctx.core.uischema,
path: props.path || '',
enabled: props.enabled,
rootSchema: ctx.core.schema,
renderers: props.renderers || ctx.renderers,
cells: props.cells || ctx.cells,
};
}

Here is the relevant discussion on discourse https://jsonforms.discourse.group/t/jsonforms-should-propagate-enabled-property-when-mapping-render-properties/489

Expected behavior

Expected behavior is that the enabled property is preserved in its own properties so that it can be passed to lower components and be able to disable/enable them

Steps to reproduce the issue

  1. Go to 'https://jsonforms-vuetify-renderers.netlify.app/#/example/main'
  2. Click on 'Committer' checkbox - make sure that it is not checked
  3. See "Address for Shipping T-Shirt" never disabled

Screenshots

No response

In which browser are you experiencing the issue?

any

Framework

Core, Vue 2

RendererSet

Other (please specify in the Additional context field)

Additional context

https://github.com/eclipsesource/jsonforms-vuetify-renderers

Potentially we could need the visibility to be mapped as well perhaps

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions