Skip to content

Commit

Permalink
Merge pull request #11779 from rak-phillip/bugfix/11716-resource-detail
Browse files Browse the repository at this point in the history
Don't provide default slot to `CruResourceFooter`
  • Loading branch information
rak-phillip committed Sep 3, 2024
2 parents 7a89118 + 5e16293 commit a2f0e6c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions shell/components/CruResource.vue
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ export default {
if (this.preventEnterSubmit) {
event.preventDefault();
}
},
shouldProvideSlot(slot) {
return slot !== 'default' && typeof this.$slots[slot] === 'function';
}
},
Expand Down Expand Up @@ -596,7 +600,7 @@ export default {
v-for="(_, slot) of $slots"
:key="slot"
>
<template v-if="typeof $slots[slot] === 'function'">
<template v-if="shouldProvideSlot(slot)">
<slot
:name="slot"
v-bind="{ ...$slots[slot]() }"
Expand Down Expand Up @@ -679,7 +683,7 @@ export default {
v-for="(_, slot) of $slots"
:key="slot"
>
<template v-if="typeof $slots[slot] === 'function'">
<template v-if="shouldProvideSlot(slot)">
<slot
:name="slot"
v-bind="{ ...$slots[slot]() }"
Expand Down

0 comments on commit a2f0e6c

Please sign in to comment.