Skip to content

Conversation

@yaffol
Copy link
Contributor

@yaffol yaffol commented Nov 20, 2025

Adds optional prepend slot to DateControlRenderer, DateTimeControlRenderer, and TimeControlRenderer to allow custom content before the input field.

Benefits:

  • Enables custom icons/buttons before input field
  • Follows existing Vuetify slot pattern (prepend-inner already exists)
  • Backward compatible (slot is optional)
  • Consistent across all date/time renderers

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 prepend slot for customisation.

@netlify
Copy link

netlify bot commented Nov 20, 2025

Deploy Preview for jsonforms-examples ready!

Name Link
🔨 Latest commit 722ef61
🔍 Latest deploy log https://app.netlify.com/projects/jsonforms-examples/deploys/69241f5d39f3b40008bfc596
😎 Deploy Preview https://deploy-preview-2504--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.

@yaffol yaffol force-pushed the feature/add-prepend-slot branch from c428310 to 2546479 Compare November 24, 2025 08:59
Add optional prepend slot to DateControlRenderer, DateTimeControlRenderer,
and TimeControlRenderer to allow custom content before the input field.
@yaffol yaffol force-pushed the feature/add-prepend-slot branch from 2546479 to 722ef61 Compare November 24, 2025 09:03
@coveralls
Copy link

Coverage Status

coverage: 82.798%. remained the same
when pulling 722ef61 on yaffol:feature/add-prepend-slot
into 0af54c5 on eclipsesource:master.

@lucas-koehler
Copy link
Contributor

Hi @yaffol , thanks for the contribution ❤️
I have one question: What is the exact use case of this? I.e. as I understand it, using the additional slot allows custom renderers using these controls to fill the prepend slot but the renderers themselves don't use them or add anything there.

Is this correct?

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.

3 participants