File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Shared/Components/TabGroup Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ export const parseSchemaHiddenType = (hiddenSchema: HiddenType): MetaHiddenType
166
166
const clone = structuredClone ( hiddenSchema )
167
167
if ( typeof clone === 'string' ) {
168
168
return {
169
- value : false ,
169
+ value : true ,
170
170
path : conformPathToPointers ( clone ) ,
171
171
}
172
172
}
Original file line number Diff line number Diff line change @@ -29,6 +29,17 @@ const Tab = ({
29
29
alignActiveBorderWithContainer,
30
30
} ) [ size ]
31
31
32
+ const onClickHandler = (
33
+ e : React . MouseEvent < HTMLButtonElement , MouseEvent > &
34
+ React . MouseEvent < HTMLAnchorElement , MouseEvent > &
35
+ React . MouseEvent < HTMLDivElement , MouseEvent > ,
36
+ ) => {
37
+ if ( active || e . currentTarget . classList . contains ( 'active' ) ) {
38
+ e . preventDefault ( )
39
+ }
40
+ props ?. onClick ( e )
41
+ }
42
+
32
43
const getTabComponent = ( ) => {
33
44
const content = (
34
45
< >
@@ -49,6 +60,7 @@ const Tab = ({
49
60
className = { `${ tabClassName } dc__no-decor flexbox-col ${ disabled ? 'cursor-not-allowed' : '' } ` }
50
61
aria-disabled = { disabled }
51
62
{ ...props }
63
+ onClick = { onClickHandler }
52
64
>
53
65
{ content }
54
66
</ Link >
@@ -59,6 +71,7 @@ const Tab = ({
59
71
className = { `${ tabClassName } dc__no-decor flexbox-col tab-group__tab__nav-link ${ disabled ? 'cursor-not-allowed' : '' } ` }
60
72
aria-disabled = { disabled }
61
73
{ ...props }
74
+ onClick = { onClickHandler }
62
75
>
63
76
{ content }
64
77
</ NavLink >
@@ -79,6 +92,7 @@ const Tab = ({
79
92
className = { `dc__unset-button-styles flexbox-col ${ tabClassName } ${ disabled ? 'cursor-not-allowed' : '' } ` }
80
93
disabled = { disabled }
81
94
{ ...props }
95
+ onClick = { onClickHandler }
82
96
>
83
97
{ content }
84
98
</ button >
You can’t perform that action at this time.
0 commit comments