@sqlrooms/ui / TabStripProps
Interface: TabStripProps
Properties
className?
optionalclassName:string
tabsListClassName?
optionaltabsListClassName:string
children?
optionalchildren:ReactNode
tabs
tabs:
TabDescriptor[]
All available tabs.
openTabs
openTabs:
string[]
IDs of tabs that are currently open.
selectedTabId?
optionalselectedTabId:string|null
ID of the currently selected tab.
preventCloseLastTab?
optionalpreventCloseLastTab:boolean
If true, hides the close button when only one tab remains open.
onClose()?
optionalonClose: (tabId) =>void
Called when a tab is closed (hidden, can be reopened).
Parameters
| Parameter | Type |
|---|---|
tabId | string |
Returns
void
onOpenTabsChange()?
optionalonOpenTabsChange: (tabIds) =>void
Called when the list of open tabs changes (open from dropdown or reorder).
Parameters
| Parameter | Type |
|---|---|
tabIds | string[] |
Returns
void
onSelect()?
optionalonSelect: (tabId) =>void
Called when a tab is selected.
Parameters
| Parameter | Type |
|---|---|
tabId | string |
Returns
void
onCreate()?
optionalonCreate: () =>void
Called when a new tab should be created.
Returns
void
onRename()?
optionalonRename: (tabId,newName) =>void
Called when a tab is renamed inline.
Parameters
| Parameter | Type |
|---|---|
tabId | string |
newName | string |
Returns
void
renderTabMenu()?
optionalrenderTabMenu: (tab) =>ReactNode
Render function for the tab's dropdown menu. Use TabStrip.MenuItem and TabStrip.MenuSeparator.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
renderSearchItemActions()?
optionalrenderSearchItemActions: (tab) =>ReactNode
Render function for search dropdown item actions. Use TabStrip.SearchItemAction.
Parameters
| Parameter | Type |
|---|---|
tab | TabDescriptor |
Returns
ReactNode
