feat: add prepend slot to date/time control renderers by yaffol · Pull Request #2504 · eclipsesource/jsonforms

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 prepend slot. The reason is useful to do this via the existing slots is that the elements line up very well across the form, and it allows you to add common customisations before or after an input, without needing to completely copy and maintain a custom renderer. If there is nothing passed in, no effect is applied to the renderer.

I have extended the support to all the renderers, and added append slots as well (apart from PasswordRenderer.vue which already uses the append slot via the built-in use of append-icon for show/hide password value. This allows for before/after content with any of the off-the-shelf renderers.

Also added is a clearable computed property to the compositions.ts which allows finer control of whether a field shows its 'clear' icon. This is to allow for cases where you don't want the clear (x) icon to show within the field. The UI Schema option clearable can be used to control this.

I've also created an example Prepend/Append Slots (Basic) in the example app, demonstrating some common use-cases.