ETabs Tabs
Examples
Guarded tabs and lazy content
Tabs
Properties
addIconintIcon used by the component.
EIcons.*
0 (no icon)
EIcons.PLUSaddableboolShow the tab-add button.
falsebeforeLeavevarGuard before leaving a tab, receiving new and old identifiers and returning a boolean or Promise.
nullclosableboolShow a close or remove button.
falsecurrentIndexintIndex of the current selected or displayed item.
-1: no selection
0 and above: item index
0editableboolAllow input editing or enable both tab addition and closing.
falseenabledboolAllow interaction; false disables the control.
trueheightrealComponent size in pixels; may be bound to its parent layout.
implicitHeightlazyboolCreate content or load data on demand; data controls use load / lazyLoad.
falsemodelvarComponent data source; item structure follows the current example and component contract.
[]movableboolAllow dragging tabs to reorder them.
falsesizeintControl size; inherits the nearest EConfigProvider by default.
EStyle.SmallEStyle.MediumEStyle.Large
Inherited; EStyle.Medium by defaultstretchboolDistribute tabs evenly across the navigation width.
falsetabPositionstringPosition of the tab bar relative to its content.
"top" / "bottom""left" / "right"
"top"typestringVisual style of the tabs.
"line" / "card""border-card"
"line"visibleboolWhether the component is visible.
truewidthrealComponent size in pixels; may be bound to its parent layout.
implicitWidthactivePanealiasRead onlyContent item of the active tab.
Alias: panes.currentItemcountintRead onlySkeleton instance count or current item count, depending on the component.
Computed at runtimecurrentNamevarRead onlyName of the current tab.
Computed at runtimeverticalboolRead onlyWhether the resolved layout is horizontal or vertical.
Computed at runtimeSignals
tabAddRequested()Emitted when the add-tab button is clicked; add a tab in the application.
tabChanged(var name)Emitted when the active tab changes; name identifies the tab.
tabMoved(int from, int to)Emitted after reordering tabs; from and to are the old and new indices.
selectionRejected(int index)Emitted when tab switching is rejected; index is the requested tab index.
tabClosed(int index, var item)Emitted when a tab closes; index and item identify the closed tab.
edited(var name, string action)Emitted when a tab is added or removed; name identifies the tab and action identifies the operation.
tabClicked(int index, var item)Emitted when a tab is clicked; index is its index and item is its data.
Methods
scrollToActiveTab()Scroll the active tab into view.
requestAdd()Request a new tab by emitting tabAddRequested.
selectName(name)Select the tab identified by name.
closeTab(index)Close the tab at index.
moveTab(from, to)Move a tab from index from to index to.
select(index)Select the item identified by the given index or key.