This repository was archived by the owner on Feb 27, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,8 @@ const getColumns = (node: React.ReactNode) => {
2323
2424 if (
2525 column . props &&
26- ( column . type === Column ||
27- // This is necessary for HMR
28- // @ts -ignore
29- column . type . displayName === 'Column' )
26+ // @ts -ignore
27+ column . type . __Column__
3028 ) {
3129 return [ ...acc , column . props ] ;
3230 }
@@ -67,10 +65,8 @@ const getColumnsAndGroups = (
6765 }
6866
6967 if (
70- elementChild . type === Group ||
71- // This is necessary for HMR
7268 // @ts -ignore
73- elementChild . type . displayName === 'Group'
69+ elementChild . type . __Group__
7470 ) {
7571 return {
7672 ...acc ,
Original file line number Diff line number Diff line change @@ -13,3 +13,6 @@ export type Props = {
1313export default function Column ( props : Props ) {
1414 return null ;
1515}
16+
17+ // Used for identifying the component type when iterating through children
18+ Column . __Column__ = true ;
Original file line number Diff line number Diff line change @@ -10,3 +10,6 @@ export type Props = {
1010export default function Group ( { children, headerRenderer, groupData } : Props ) {
1111 return null ;
1212}
13+
14+ // Used for identifying the component type when iterating through children
15+ Group . __Group__ = true ;
You can’t perform that action at this time.
0 commit comments