Skip to content

Object inside array with readOnly true is not showing as disabled with material cells #2384

Open
@neosri

Description

@neosri

Describe the bug

Object inside array with readOnly true is not showing as disabled with material cells.

Expected behavior

Objects defined inside of an array in JsonSchema with a property having a readOnly keyword set to true should render the property/control as disabled.

Steps to reproduce the issue

  1. define a JsonSchema as shown below
const schema =  {
	type: 'array',
	title: 'test',
	description: 'connection ',
	items: {
		type: 'object',
		title: 'test',
		description: 'test',
		properties: {
			ipAddress: {
				readOnly:true,
				type: 'string'							
			},
			port: {
				readOnly:true,
				type: 'number'							
			}						
		},
		required: ['ipAddress']
	}
}
  1. Create a Jsonforms component and pass the jsonschema defined above, UI Schema is not relevant here. We are using the material cells and material renderers.
  2. The ipAddress and port properties defined above with readOnly true would be still editable.

Screenshots

No response

Which Version of JSON Forms are you using?

latest

Package

React Material Renderers

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions