-
Notifications
You must be signed in to change notification settings - Fork 416
feat: add prepend slot to date/time control renderers #2504
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
feat: add prepend slot to date/time control renderers #2504
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.