rjsf-team / react-jsonschema-form

A React component for building Web forms from JSON Schema.
https://rjsf-team.github.io/react-jsonschema-form/
Apache License 2.0
14.35k stars 2.19k forks source link

uiSchema `accept` is not applied except while using the default theme #3577

Open samialitop3 opened 1 year ago

samialitop3 commented 1 year ago

Prerequisites

What theme are you using?

material-ui

Version

5.5.0

Current Behavior

The accept option is not applied to the input using any theme except the default theme. Other options are applicable.

Expected Behavior

When passing the accept option it should add the accept=".fileType" to the input element.

Steps To Reproduce

This can be found on the playground link and has proven to be broken except on the default theme. https://rjsf-team.github.io/react-jsonschema-form/

Environment

- OS: macOS
- Node: v16.19.1
- npm: 8.19.3

Anything else?

No response

heath-freenome commented 1 year ago

Is this for files?

samialitop3 commented 1 year ago

Yes, this is for files that are defined in the schema like this file_element: { type: 'string', format: 'data-url', }

and in the uiSchema when defining the ui:options to be { accept: '.pdf }`}, it works only with the default theme, all other themes don't work.

heath-freenome commented 1 year ago

@samialitop3 AH, yeah, this is an issue for many of the themes. I think that the material-ui themes might work given how they are implemented.

samialitop3 commented 1 year ago

@heath-freenome The material-ui theme is not working as well, you can check it on the playground link

a3957273 commented 1 year ago

Looks like 'multiple' also doesn't work on MUI v5. Not sure whether to create a new error or include it in this one.

yuzhanglong commented 1 year ago

same problem

heath-freenome commented 1 year ago

Looks like 'multiple' also doesn't work on MUI v5. Not sure whether to create a new error or include it in this one.

Keep it in this one

samialitop3 commented 12 months ago

@heath-freenome Any updates on this?

heath-freenome commented 12 months ago

@samialitop3 Given we have a few, very busy volunteers maintaining the project, we rely largely on contributions from people who are willing to provide fixes/features. Are you able to help on this?