Enhancement/2122 add description to array renderer - #2227
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
Hi @SaSteffen, thanks for the contribution ❤️ We will take a look very soon |
8bd14c2 to
e9946ef
Compare
|
@sdirix Sure. Added the conditional rendering and the two tests. |
sdirix
left a comment
There was a problem hiding this comment.
We need to use && instead of ?? as ?? short circuits and will use the description as is and not with the FormHelperText.
Is it possible to search for the FormHelperText element in the tests too?
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
Sorry, of course.
I checked the DOM and it does not generate any element around it, even if the FormHelperText has an id attribute. If you prefer, I can put it in a div and use that one in the tests. |
I used nested selectors to check for the respective elements. I also added tests checking for the non-existence of them in case there is no description. |
That leaves nothing else to be done, right? Thank you for the support. |
|
Thanks for the contribution ❤️ |
As discussed in #2122: This is a minimal change that renders a description for primitive and object array renderers in React MUI.
The Primitive example looks like this:

The other one looks like this:

As discussed, I just used a FormHelperText. We could achieve similar results using custom typography elements probably.