fix(popper): trigger ref (#1419)

This commit is contained in:
1148177968 2021-02-05 14:39:09 +08:00 committed by GitHub
parent bf09e894c5
commit 396a89104a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,5 +16,5 @@ interface IRenderTriggerProps extends Record<string, unknown> {
export default function renderTrigger(trigger: VNode[], extraProps: IRenderTriggerProps) {
const firstElement = getFirstValidNode(trigger, 1)
if (!firstElement) throwError('renderTrigger', 'trigger expects single rooted node')
return cloneVNode(firstElement, extraProps)
return cloneVNode(firstElement, extraProps, true)
}