How to create readOnly text control?

Hello.I Have schema with string property. I want to create ui schema read only control for this property. I Create ui schema control with “readOnly: true” settings but control does not become readOnly.

I found documentation here: Home · jsonform/jsonform Wiki · GitHub

What should i do to make control read only?

Hi @MoHcmp, the new readOnly support is currently only available on the next stream of JSON Forms. You can install JSON Forms Next via npm install @jsonforms/core@next @jsonforms/react@next @jsonforms/material-renderers@next.

If you’re already using the next stream of JSON Forms, then please post your schema and ui schema and which renderer set you’re using.

1 Like

Hi @sdirix

i’m also trying to make use of readOnly and have just upgraded to @jsonforms/core@next etc. To do this I also changed my version of material ui core and icons to 4.11.2 as I believe you have in the jsonforms core next.

The problem i’m facing is that I also use material ui labs 4.0.0-alpha.56 and this seems to require material ui core 4.12.

Do you know if it’s possible for me to use @jsonforms/core@next etc with a newer version of material ui core, or how I determine which version of labs works for core 4.11.2?


Hi @james-morris, all our Material dependencies are “peer dependencies” so none of them should be installed automatically. The idea is you can choose the versions of the Material packages you want, as long as they are compatible.

I don’t know of any backward compatibility break within the 4.X line of Material UI so I think you should be fine to use the versions you like. Please let me know if there are problems.

Not that we will upgrade to Material v5 for the 3.0 release so if you want to use the stable version of 3.0 you will need to also upgrade to Material v5.