react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

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

Open samialitop3 opened this issue 1 year ago • 9 comments

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

samialitop3 avatar Apr 05 '23 00:04 samialitop3

Is this for files?

heath-freenome avatar Apr 05 '23 20:04 heath-freenome

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.

samialitop3 avatar Apr 05 '23 20:04 samialitop3

@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.

heath-freenome avatar Apr 07 '23 15:04 heath-freenome

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

samialitop3 avatar Apr 10 '23 18:04 samialitop3

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

a3957273 avatar Apr 15 '23 21:04 a3957273

same problem

yuzhanglong avatar May 04 '23 15:05 yuzhanglong

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

heath-freenome avatar May 04 '23 16:05 heath-freenome

@heath-freenome Any updates on this?

samialitop3 avatar Nov 17 '23 23:11 samialitop3

@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?

heath-freenome avatar Nov 17 '23 23:11 heath-freenome