Skip to main content
cngx-src documentation

CngxTabOverflowItemContext

Interface

projects/common/tabs/overflow/tab-overflow-item.directive.ts

Import#

import { CngxTabOverflowItemContext } from '@cngx/common/tabs'

Description#

Context for the *cngxTabOverflowItem template. Replaces the default tab.label() ?? tab.id text inside the More popover; the surrounding <li role="menuitem"> shell (aria-disabled, click handler, data-tab-id) stays library-owned.

Index#

Instance Properties#

Readonly

Convenience alias for tab - usable as let-tab shorthand.

disabled#boolean
Readonly

Mirrors tab.disabled() - pre-resolved for consumer convenience.

index#number
Readonly

Row index inside hiddenTabs(), starting at 0.

Readonly

Commit-aware select. Routes through panelHost.selectById(tab.id) and dismisses the popover; no-op when disabled.

Readonly

The hidden tab the row represents.

CngxTabOverflowItem

The slot replaces only the visible body of each overflow popover row. The row shell, role, and selection stay library-owned, so an override cannot break the menu pattern.

  • Role and state are library-owned. Each row is a role="menuitem" inside the popover role="menu"; aria-disabled reflects the pre-resolved disabled flag. The template never sets these.
  • Selection is commit-aware. Picking a row runs through the pick() callback, which routes selectById through the commit lifecycle (optimistic/pessimistic, rollback on failure). Use it; do not wire your own click handler.
  • Keyboard and focus are library-owned. The active row is steered by aria-activedescendant on the trigger; the slot manages neither focus nor keys.
  • Keep the template presentational. The shell is already a menuitem, so do not nest interactive elements (a <button>, <a>, or routerLink) inside it. Icons and text only.