Skip to content

Commit

Permalink
Add missing scoped slots
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmeister committed Apr 28, 2024
1 parent 7777ffc commit 2dfad2a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 9 additions & 1 deletion frontend/src/components/form/base/ENumberField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@
reset-on-blur
v-bind="$attrs"
@input="$emit('input', $event)"
/>
>
<!-- passing through all slots -->
<slot v-for="(_, name) in $slots" :slot="name" :name="name" />
<template #scoped="{ scopedSlots }">
<template v-for="(_, name) in scopedSlots" :slot="name" slot-scope="slotData">
<slot :name="name" v-bind="slotData" />
</template>
</template>
</EParseField>
</template>

<script>
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/form/base/EParseField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ Displays a field as a textfield (can be used with v-model)
>
<!-- passing through all slots -->
<slot v-for="(_, name) in $slots" :slot="name" :name="name" />
<template v-for="(_, name) in $scopedSlots" :slot="name" slot-scope="slotData">
<slot :name="name" v-bind="slotData" />
</template>
<slot name="scoped" :scoped-slots="$scopedSlots">
<template v-for="(_, name) in $scopedSlots" :slot="name" slot-scope="slotData">
<slot :name="name" v-bind="slotData" />
</template>
</slot>
</v-text-field>
</ValidationProvider>
</template>
Expand Down

0 comments on commit 2dfad2a

Please sign in to comment.