@@ -15,7 +15,6 @@ export interface ResponsiveActionsProps extends Omit<OverflowMenuProps, 'ref' |
1515 children : React . ReactNode ;
1616}
1717
18- // Inner component that has access to OverflowMenuContext
1918const ResponsiveActionsDropdown : FunctionComponent < {
2019 ouiaId : string ;
2120 dropdownItems : ReactNode [ ] ;
@@ -25,20 +24,15 @@ const ResponsiveActionsDropdown: FunctionComponent<{
2524 const [ isOpen , setIsOpen ] = useState ( false ) ;
2625 const { isBelowBreakpoint } = useContext ( OverflowMenuContext ) ;
2726
28- // Determine if kebab should be disabled based on breakpoint
2927 const isKebabDisabled = ( ( ) => {
3028 const allPinnedDisabled = pinnedItemsDisabled . length > 0 && pinnedItemsDisabled . every ( disabled => disabled ) ;
3129 const allRegularDisabled = regularItemsDisabled . length > 0 && regularItemsDisabled . every ( disabled => disabled ) ;
3230
3331 if ( isBelowBreakpoint ) {
34- // Below breakpoint: pinned items are IN the dropdown, so check all dropdown items
35- // Disabled only if both pinned AND regular items exist and are all disabled
3632 return ( pinnedItemsDisabled . length > 0 || regularItemsDisabled . length > 0 ) &&
3733 ( pinnedItemsDisabled . length === 0 || allPinnedDisabled ) &&
3834 ( regularItemsDisabled . length === 0 || allRegularDisabled ) ;
3935 } else {
40- // Above breakpoint: pinned items are shown as buttons, only check regular items
41- // Disabled only if there are regular items and they're all disabled
4236 return allRegularDisabled ;
4337 }
4438 } ) ( ) ;
@@ -93,7 +87,6 @@ export const ResponsiveActions: FunctionComponent<ResponsiveActionsProps> = ({ o
9387 </ OverflowMenuItem >
9488 ) ;
9589 } else {
96- // Track if there are any regular (non-persistent, non-pinned) actions
9790 hasRegularActions = true ;
9891 }
9992
@@ -103,7 +96,6 @@ export const ResponsiveActions: FunctionComponent<ResponsiveActionsProps> = ({ o
10396 { children }
10497 </ OverflowMenuDropdownItem >
10598 ) ;
106- // Track disabled state separately for pinned vs regular items
10799 if ( isPinned ) {
108100 pinnedItemsDisabled . push ( ! ! actionProps . isDisabled ) ;
109101 } else {
0 commit comments