Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the isValidElement function is not work with fragment #5556

Closed
1 task done
iqingting opened this issue Apr 28, 2022 · 1 comment
Closed
1 task done

the isValidElement function is not work with fragment #5556

iqingting opened this issue Apr 28, 2022 · 1 comment
Labels

Comments

@iqingting
Copy link

iqingting commented Apr 28, 2022

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

3.2.2

Environment

macOS 12.0.1, Chrome 100.0.4896.60, Vue 3.2.31

Reproduction link

Edit on CodeSandbox

Steps to reproduce

open console panel to see the error log

What is expected?

customRender work as well with no error

What is actually happening?

customRender work as well but antdv think i need to use customCell


the problem is the type of fragment element is Symbol(Fragment), so the isValidElement thinks the fragment is not a valid element.

function isValidElement(element) {
if (Array.isArray(element) && element.length === 1) {
element = element[0];
}
return element && element.__v_isVNode && typeof element.type !== 'symbol'; // remove text node
}

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant