Skip to content

API Reference / @gtkx/navigation / TabViewActionHelpers

Type Alias: TabViewActionHelpers<ParamList> ​

TabViewActionHelpers<ParamList> = object

Defined in: packages/navigation/src/tab-view/types.ts:60

Action helpers added to the navigation object of tab view screens. Keys default to the selected tab.

Type Parameters ​

ParamList ​

ParamList extends ParamListBase

Methods ​

closeOtherTabs() ​

closeOtherTabs(key?): void

Defined in: packages/navigation/src/tab-view/types.ts:70

Closes every unpinned tab except one.

Parameters ​

key? ​

string

Returns ​

void


closeTab() ​

closeTab(key?): void

Defined in: packages/navigation/src/tab-view/types.ts:68

Closes a tab. Closing the last tab is left to the parent navigator or onUnhandledAction.

Parameters ​

key? ​

string

Returns ​

void


closeTabsAfter() ​

closeTabsAfter(key?): void

Defined in: packages/navigation/src/tab-view/types.ts:74

Closes the unpinned tabs after one.

Parameters ​

key? ​

string

Returns ​

void


closeTabsBefore() ​

closeTabsBefore(key?): void

Defined in: packages/navigation/src/tab-view/types.ts:72

Closes the unpinned tabs before one.

Parameters ​

key? ​

string

Returns ​

void


openTab() ​

openTab<RouteName>(name, params?, options?): void

Defined in: packages/navigation/src/tab-view/types.ts:62

Opens a new tab for a screen, or selects the open tab whose getId matches.

Type Parameters ​

RouteName ​

RouteName extends string | number | symbol

Parameters ​

name ​

RouteName

params? ​

ParamList[RouteName]

options? ​

TabViewOpenOptions

Returns ​

void


pinTab() ​

pinTab(key, pinned): void

Defined in: packages/navigation/src/tab-view/types.ts:80

Pins a tab, moving it after the other pinned tabs, or unpins it, moving it before the unpinned tabs.

Parameters ​

key ​

string

pinned ​

boolean

Returns ​

void


reorderTab() ​

reorderTab(key, position): void

Defined in: packages/navigation/src/tab-view/types.ts:78

Moves a tab within its pinned or unpinned group.

Parameters ​

key ​

string

position ​

number

Returns ​

void


selectTab() ​

selectTab(key): void

Defined in: packages/navigation/src/tab-view/types.ts:76

Selects a tab.

Parameters ​

key ​

string

Returns ​

void