Skip to content

How to adapt jsonforms in a custom UIExtension? #147

Answered by ndoschek
rsoika asked this question in All other
Discussion options

You must be logged in to vote

Hi @rsoika!

The necessary dependencies you will have to add will be:

"dependencies": {
    "@jsonforms/core": "^3.0.0-beta.1",
    "@jsonforms/react": "^3.0.0-beta.1",
    "@jsonforms/vanilla-renderers": "^3.0.0-beta.1",
   ...
},
"peerDependencies": {
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    ...
}

To render the JSON forms component you need a container node (some HTMLElement, which could probably be the containerElement in your UIExtension or a child of it) to render it in, as it is done for example in the JsonFormsPropertyViewWidget#renderForms function.
Also, it will be necessary to change your extension's file extension to .tsx and set "jsx": "react" in your tsconfig…

Replies: 4 comments 6 replies

Comment options

You must be logged in to vote
4 replies
@rsoika
Comment options

@rsoika
Comment options

@ndoschek
Comment options

@rsoika
Comment options

Answer selected by ndoschek
Comment options

You must be logged in to vote
2 replies
@ndoschek
Comment options

@rsoika
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants