File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
packages/react-core/src/components/Tabs Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -360,10 +360,6 @@ class Tabs extends Component<TabsProps, TabsState> {
360
360
currentLinkAccentStart : `${ startValue } px` ,
361
361
...( shouldInitializeStyle && { isInitializingAccent : true } )
362
362
} ) ;
363
-
364
- requestAnimationFrame ( ( ) => {
365
- this . setState ( { isInitializingAccent : false } ) ;
366
- } ) ;
367
363
} ;
368
364
369
365
handleResize = ( ) => {
@@ -442,6 +438,13 @@ class Tabs extends Component<TabsProps, TabsState> {
442
438
if ( prevState . uncontrolledIsExpandedLocal !== this . state . uncontrolledIsExpandedLocal ) {
443
439
this . setAccentStyles ( true ) ;
444
440
}
441
+
442
+ if (
443
+ ( parseInt ( prevState . currentLinkAccentLength ) === 0 && parseInt ( this . state . currentLinkAccentLength ) !== 0 ) ||
444
+ prevState . currentLinkAccentStart !== this . state . currentLinkAccentStart
445
+ ) {
446
+ this . setState ( { isInitializingAccent : false } ) ;
447
+ }
445
448
}
446
449
447
450
static getDerivedStateFromProps ( nextProps : TabsProps , prevState : TabsState ) {
You can’t perform that action at this time.
0 commit comments