Skip to content

Make ControlWrapper configurable in vue-vanilla #1927

Description

@dzikoysk

Is your feature request related to a problem? Please describe.

We'd like to modify the the way how JsonForms Vanilla for Vue 3 renders controls, to e.g. sth like:


Label
Description
[ Control ]


Unfortunately, all built-in control renderers use ControlWrapper under the hood that defines this behavior, but it's simply just a hardcoded component that we cannot modify:

<template>
<div v-if="visible" :class="styles.control.root" :id="id">
<label :for="id + '-input'" :class="styles.control.label">
{{ computedLabel }}
</label>
<div :class="styles.control.wrapper">
<slot></slot>
</div>
<div :class="errors ? styles.control.error : styles.control.description">
{{ errors ? errors : showDescription ? description : null }}
</div>
</div>
</template>

Describe the solution you'd like

Would be great if ControlWrapper could be provided by user in configuration or as a renderer, e.g. ControlWrapperRenderer just like any other wrapper.

Describe alternatives you've considered

At this point, we're forced to make a fork to provide desired functionality as it's probably the only way atm.

unknown-141

~ https://github.com/reposilite-playground/jsonforms

Framework

Vue 3

RendererSet

Vanilla

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions