Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion packages/runtime-dom/src/components/TransitionGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ const TransitionGroupImpl: ComponentOptions = /*@__PURE__*/ decorate({
tag = 'span'
}

// Filter out transition-specific props and TransitionGroup-specific props
// to avoid invalid HTML attributes
const filteredProps: Record<string, any> = {}
for (const key in rawProps) {
if (
!(key in TransitionPropsValidators) &&
key !== 'tag' &&
key !== 'moveClass'
) {
filteredProps[key] = (rawProps as any)[key]
}
}

prevChildren = []
if (children) {
for (let i = 0; i < children.length; i++) {
Expand Down Expand Up @@ -167,7 +180,7 @@ const TransitionGroupImpl: ComponentOptions = /*@__PURE__*/ decorate({
}
}

return createVNode(tag, null, children)
return createVNode(tag, filteredProps, children)
}
},
})
Expand Down