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.1k stars 2.18k forks source link

[Theme][Bootstrap4] Readonly attribute is not valid on select element #2616

Closed Lausselloic closed 2 years ago

Lausselloic commented 2 years ago

Hello,

Looks like there's a mistake on bootstrap4 select Widget that have been fixed in core. Readonly attribute have no effect on select element. So maybe like in core https://github.com/rjsf-team/react-jsonschema-form/blob/79a61ff70c25f84ec3e989899ac7f92d1dd3e443/packages/core/src/components/widgets/SelectWidget.js#L74 use disabled on select element if readonly or disabled value is set to true?

https://github.com/rjsf-team/react-jsonschema-form/blob/79a61ff70c25f84ec3e989899ac7f92d1dd3e443/packages/bootstrap-4/src/SelectWidget/SelectWidget.tsx#L91

Lausselloic commented 2 years ago

Issue also present on semanticUI : https://github.com/rjsf-team/react-jsonschema-form/blob/79a61ff70c25f84ec3e989899ac7f92d1dd3e443/packages/semantic-ui/src/SelectWidget/SelectWidget.js#L113

epicfaace commented 2 years ago

Interesting, can you make a PR to fix it?

-- Ashwin Ramaswami

On Fri, Nov 19, 2021 at 6:01 AM Laussel Loïc @.***> wrote:

Issue also present on semanticUI : https://github.com/rjsf-team/react-jsonschema-form/blob/79a61ff70c25f84ec3e989899ac7f92d1dd3e443/packages/semantic-ui/src/SelectWidget/SelectWidget.js#L113

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rjsf-team/react-jsonschema-form/issues/2616#issuecomment-973974723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAM4MX5AWTYIBDRIDKC3PDTUMYVBZANCNFSM5IL2ZRUA .

heath-freenome commented 2 years ago

Fixed in v5 beta via https://github.com/rjsf-team/react-jsonschema-form/pull/3036