You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -435,7 +445,7 @@ class OverflowMenuPersist extends React.Component {
435
445
<OverflowMenuControl hasAdditionalOptions>
436
446
<DropdownNext
437
447
onSelect={this.onSelect}
438
-
toggle={toggleRef=> (
448
+
toggle={(toggleRef)=> (
439
449
<MenuToggle
440
450
ref={toggleRef}
441
451
aria-label="Persistent example overflow menu"
@@ -447,12 +457,14 @@ class OverflowMenuPersist extends React.Component {
447
457
</MenuToggle>
448
458
)}
449
459
isOpen={isOpen}
450
-
onOpenChange={isOpen=>setIsOpen(isOpen)}
460
+
onOpenChange={(isOpen) =>
461
+
this.setState({
462
+
isOpen
463
+
})
464
+
}
451
465
>
452
-
<DropdownList>
453
-
{dropdownItems}
454
-
</DropdownList>
455
-
</DropdownNext>
466
+
<DropdownList>{dropdownItems}</DropdownList>
467
+
</DropdownNext>
456
468
</OverflowMenuControl>
457
469
</OverflowMenu>
458
470
);
@@ -467,4 +479,5 @@ By passing in the `breakpointReference` property, the overflow menu's breakpoint
467
479
You can change the container width in this example by adjusting the slider. As the container width changes, the overflow menu will change between a horizontal menu and a vertical dropdown despite the viewport width not changing.
0 commit comments