Skip to content

Conversation

lucasoares
Copy link

@lucasoares lucasoares commented Sep 25, 2025

Fixes #2492

This is a draft PR initially generated with Copilot and then reworked manually.

I'm not familiar with the jsonforms codebase and don't have much time right now to dive deeply into it. I did a bit of work on top of what Copilot generated, but I didn’t spend too much time polishing it. The goal was mainly to provide a working version of additionalProperties rendering with the Material renderer.

Everything appears to be working: adding and removing data inside both the object and its arrays. That said, this was mostly an experiment to see if Copilot could handle the issue (I may end up using this version in a fork). For this to be production-ready, it will likely need to be redone properly using this as a reference. Since I have 0 context of jsonforms code, I couldn’t provide more detailed instructions for further development.

Schema example:

"propertiesArrayOfValuesByKey": {
  "type": "object",
  "title": "Array of Values by Key",
  "additionalProperties": {
    "type": "array",
    "items": {
      "type": "string"
    },
    "title": "Item"
  }
}

Rendered form:

image

All actions are working: you can add and remove data inside both the object and the arrays.

Copilot AI and others added 4 commits September 24, 2025 18:17
…derers

Co-authored-by: lucasoares <10624972+lucasoares@users.noreply.github.com>
…lated imports

- Deleted the additional-properties-material example file and its associated code.
- Updated the additional-properties example to include new properties for handling arrays of values by key.
- Removed import references to additional-properties-material in index files.
- Enhanced MaterialAdditionalPropertiesRenderer to support dynamic titles and improved rendering logic for additional properties.
- Modified MaterialObjectRenderer to conditionally skip JsonFormsDispatch when only additional properties are present, improving rendering efficiency.
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit c2d5fb1
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/68d495471b8c2c0008481c6c
😎 Deploy Preview https://deploy-preview-2494--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 project configuration.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ Copilot
❌ lucasoares
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Support additionalProperties in React Material renderer set
3 participants