Add "append" and "prepend" slots for vue-vuetify extended renderers
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- frontend
Research direction
Start by locating AutocompleteEnumControlRenderer and AutocompleteOneOfEnumControlRenderer in the Vue Vuetify package, then compare their slot handling with the other control renderers. Add the prepend and append slots to both extended renderers and check that the slot content reaches the underlying Vuetify components with consistent formatting.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
The jsonforms/vue-vuetify README states that "all control renderers now support prepend and append slots". However, these slots are missing for the extended renderers, namely AutocompleteEnumControlRenderer and AutocompleteOneOfEnumControlRenderer. This means that when using extendedVuetifyRenderers, enum controls lack the slots while others have them.
Describe the solution you'd like
Add the "prepend" and "append" slots to the extended renderers, for consistency with the others.
Describe alternatives you've considered
My current workaround is to implement a custom renderer which wraps the autocomplete renderers in a div with the slot content either side, like:
<template>
<!-- Adds slots to the default autocomplete oneOf enum renderer. -->
<div class="d-flex align-center">
<div v-if="$slots.prepend" class="mr-4">
<slot name="prepend" />
</div>
<AutocompleteEnumControlRenderer class="flex-fill" v-bind="props" />
<div v-if="$slots.append" class="ml-4">
<slot name="append" />
</div>
</div>
</template>
<script setup lang="ts">
import { type RendererProps } from '@jsonforms/vue';
import { AutocompleteEnumControlRenderer } from '@jsonforms/vue-vuetify';
const props = defineProps<RendererProps>();
</script>
However, this doesn't actually pass the slot content to the underlying Vuetify components (v-select/v-autocomplete), so it's a bit of a hack and formatting is off.
Package
Vue Vuetify Renderers
Additional context
I intend to push a PR for this shortly.
- Dominant language
- TypeScript
- Stars
- 2.8k
- Forks
- 423
- Avg merge
- 5d 16h
- Merged PRs (30d)
- 9
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipsesource/jsonforms
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipsesource/jsonforms#2664 ·
Maintainers usually reply within 1 day
-
angular material
Difficulty 1/5 Under an hour Newbie friendliness 88/100
eclipsesource/jsonforms#2662 · 1 comment ·
Maintainers usually reply within 1 day
-
core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eclipsesource/jsonforms#2570 · 1 comment ·
Maintainers usually reply within 1 day
-
dev
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
eclipsesource/jsonforms#2651 ·
Maintainers usually reply within 1 day
-
angular material
Difficulty 4/5 3-5 days Newbie friendliness 68/100
eclipsesource/jsonforms#2630 ·
Maintainers usually reply within 1 day
All issues in eclipsesource/jsonforms
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
README の通知条件を実際の判定処理に合わせるPossibly taken @unhappychoice claimed this today. Openfactory:in-progress priority:medium
Difficulty 1/5 Under an hour Newbie friendliness 90/100
unhappychoice/oss-issue-opener#395 · 1 comment ·
Maintainers usually reply within 1 day
-
bug Website
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
OWASP/OWASP-Hunting#88 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day