Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable vanilla array buttons when readonly #2303

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

joefreeman
Copy link
Contributor

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?)

Copy link

netlify bot commented Mar 14, 2024

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 6f4e0e4
🔍 Latest deploy log https://app.netlify.com/sites/jsonforms-examples/deploys/65f2f856a306a2000809baf7
😎 Deploy Preview https://deploy-preview-2303--jsonforms-examples.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution ❤️! Works for me!

Adapting the examples is great and allows to easily test the new functionality manually, thanks 👍!

Please also add a unit test so that the new behavior is safe from regressions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants