Skip to content

Commit e399b43

Browse files
committed
Fix ExpandedItems scoped slots for Vue 3 compat mode
Use $scopedSlots (Vue 2 compat API) with fallback to $slots for passing slot props in render function. The pure Vue 3 renderSlot() doesn't work correctly with compat mode's slot handling.
1 parent 01bd8df commit e399b43

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

client/src/components/History/Content/ExpandedItems.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ export default {
4848
}
4949
},
5050
render() {
51-
const slot = this.$slots.default;
52-
if (slot) {
53-
return slot({
51+
// Use $scopedSlots for Vue 3 compat mode
52+
const slotFn = this.$scopedSlots?.default || this.$slots?.default;
53+
if (slotFn) {
54+
return slotFn({
5455
isExpanded: this.isExpanded,
5556
setExpanded: this.setExpanded,
5657
collapseAll: this.reset,

0 commit comments

Comments
 (0)