Disable vanilla array buttons when readonly
This updates the vanilla array controls (TableArrayControl and ArrayControlRenderer) to disable the buttons (for adding/removing/moving items) when the control is set to readonly (otherwise the data can be updated while readonly).
To (manually) test this, I've updated the examples to support setting the readonly property of the <JsonForms>, and added toggle actions to a couple of the array examples. (Not sure if there's a better way to do this?)
Deploy Preview for jsonforms-examples ready!
| Name | Link |
|---|---|
| Latest commit | 5e519d74ab2c3f8e4c6552849622d8eab3c40f4c |
| Latest deploy log | https://app.netlify.com/sites/jsonforms-examples/deploys/66e2c4439a1892000856da21 |
| Deploy Preview | https://deploy-preview-2303--jsonforms-examples.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@sdirix @joefreeman I added tests that check that buttons are rendered with expected enabled and disabled state for enabled/disabled controls.