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
13.84k stars 2.17k forks source link

Not able to control ui schema of oneOf items #4231

Open NishantJS opened 4 days ago

NishantJS commented 4 days ago

Prerequisites

What theme are you using?

material-ui

What is your question?

I am not able to set UI Schema for oneOf items. in this example placeholder is not visible for oneOf items but visible for other field. workaround for it to set ui schema for vendor_bill_payment_bank_name filed at base level of ui schema, but I cannot use it as on select change I am changing widget but using same field.

Playground Link

nickgros commented 4 days ago

@NishantJS if you want to apply UI Schema properties to oneOf, you have to do so in a oneOf array (see docs here). That said, it looks like you are trying to do some sort of conditional logic within your uiSchema, which is not possible.