feat: add prepend slot to date/time control renderers#2504
feat: add prepend slot to date/time control renderers#2504lucas-koehler merged 5 commits intoeclipsesource:masterfrom
Conversation
✅ Deploy Preview for jsonforms-examples ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
2546479 to
722ef61
Compare
|
Hi @yaffol , thanks for the contribution ❤️ Is this correct? |
722ef61 to
b6ac7df
Compare
|
Hi @lucas-koehler, Yes, that is correct. This allows custom renderers which wrap the upstream controls - such as a tooltip or copy to clipboard icon - which should be rendered in the field's I have extended the support to all the renderers, and added Also added is a I've also created an example |
lucas-koehler
left a comment
There was a problem hiding this comment.
Hi @yaffol , Thanks for this improvement ❤️ ! It adds a lot of flexibility and the examples showcase using this well!
Adds optional
prependslot to DateControlRenderer, DateTimeControlRenderer, and TimeControlRenderer to allow custom content before the input field.Benefits:
Use Case: Allows adding info/help icons or other custom content in the prepend area of v-text-field.
Testing: All existing tests pass. The conditional application with
v-if="$slots.prepend"prevents and empty<div class="v-input__prepend">being injected to the rendered html.Extension: If this pattern is acceptable, I could extend it across all the renderers, to allow access to the
prependslot for customisation.