Skip to content

Commit

Permalink
fix: fix jsx decode in openinula-table
Browse files Browse the repository at this point in the history
  • Loading branch information
Rui-Sun committed Mar 21, 2024
1 parent 8c43a99 commit b016ef8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/vtable/src/scenegraph/component/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,12 @@ export function dealPercentCalc(group: VGroup, parentWidth: number, parentHeight

// temp devode for react jsx customLayout
export function decodeReactDom(dom: any) {
if (!dom || !dom.$$typeof) {
// not react
if (
!dom ||
(!isValid(dom.$$typeof) && // for react
!isValid(dom.vtype)) // for openinula
) {
// not react or openinula
return dom;
}
const type = dom.type;
Expand Down

0 comments on commit b016ef8

Please sign in to comment.