Skip to main content
cngx-src documentation

CngxTabDismissals

Interface

projects/common/tabs/dismissals/tab-dismissals.ts

Referenced by#

Import#

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

Description#

Resolved dismissable/addable surface for <cngx-tab-group>.
The organism holds this as one field and the template reads it.

Index#

Instance Properties#

resolvedAddable#Signal
Readonly

Effective group-level add affordance (input ?? config ?? false).

resolvedClosable#Signal
Readonly

Effective group-level close affordance (input ?? config ?? false).

Methods#

closeButtonLabel#string
closeButtonLabel(tab: CngxTabHandle)

i18n accessible name for a tab's close button.

@paramtabCngxTabHandle
closeIconContextFor#CngxTabCloseIconContext
closeIconContextFor(tab: CngxTabHandle)

Stable *cngxTabCloseIcon context ({ tab }) per tab.

@paramtabCngxTabHandle
handleAdd#void

Request a new tab via the add button.

handleClose#void
handleClose(tab: CngxTabHandle, event?: Event)

Close a tab and restore focus to the new active tab / add button.

@paramtabCngxTabHandle
@paramevent?Event
handleTabKeydown#void
handleTabKeydown(tab: CngxTabHandle, event: KeyboardEvent)

Delete on a focused closable tab requests its close (APG).

@paramtabCngxTabHandle
@parameventKeyboardEvent
isTabClosable#boolean
isTabClosable(tab: CngxTabHandle)

Per-tab closable: per-tab override > group resolution.

@paramtabCngxTabHandle