File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,23 @@ export const getElementClickEvent = (element: ReactNode) => {
52
52
const checkForClickHandler = ( el : ReactNode ) => {
53
53
if ( ! isValidElement ( el ) ) return ;
54
54
55
+ // @ts -expect-error: Difficult to type
56
+ if ( 'displayName' in el . type && el . type . displayName === 'Checkbox' ) {
57
+ hasClickHandler = true ;
58
+
59
+ return ;
60
+ }
61
+
62
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
55
63
if ( el . props . onClick ) {
56
64
hasClickHandler = true ;
57
65
58
66
return ;
59
67
}
60
68
69
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
61
70
if ( el . props . children ) {
71
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access
62
72
Children . forEach ( el . props . children , checkForClickHandler ) ;
63
73
}
64
74
} ;
You can’t perform that action at this time.
0 commit comments