Skip to content

Support extra material ui options for fields #1647

@dekelb

Description

@dekelb

Material-UI's form fields support more UI configurations, but those config settings are not exported to the user with the current widgets.
For example - if you look at the current implementation of the RangeWidget you can see the following:

<Slider
    {...sliderProps}
    disabled={disabled || readonly}
    onChange={_onChange}
    onBlur={_onBlur}
    onFocus={_onFocus}
/>

MateriaUI's Slider component support also properties, such as marks/scale/orientation/valueLabelDisplay and others.
This is just an example for the Slider widget, but other widgets will probably have other properties that we would like to support.

There are multiple ways to solve this, I think it's best to do this from the uiSchema (since it's not related to the schema itself).

My suggestion is to have ui:props in the uiSchema of the field, and pass these values to the field itself.

I'm happy to open a PR for this, in case it makes sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions