Skip to content

Arrays can be modified even with readonly property set on true #1901

@MauricioZanon

Description

@MauricioZanon

Describe the bug

The buttons for adding or removing elements from an array are visible and functional in the form even if I set it for readonly.

Expected behavior

I should not be able to modify the form in readonly mode.

Steps to reproduce the issue

  1. Create a Form
  2. Set a JSON with an array in its data property
  3. Set the readonly property to true

Screenshots

image

In which browser are you experiencing the issue?

Google Chrome Versión 99.0.4844.51

Framework

React

RendererSet

Material

Additional context

Dependencies used:
"@emotion/react": "^11.5.0",
"@emotion/styled": "^11.3.0",
"@jsonforms/core": "3.0.0-alpha.3",
"@jsonforms/material-renderers": "3.0.0-alpha.3",
"@jsonforms/react": "3.0.0-alpha.3",
"@mui/icons-material": "^5.2.0",
"@mui/lab": "^5.0.0-alpha.58",
"@mui/material": "^5.2.2",
"@mui/styles": "^5.2.3",

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions