new UWA.Controls.TabView.DropdownTab(name, items, options)
Provides DropdownTab instances for use with TabView.
Example
var dropdownTab = new UWA.Controls.TabView.DropdownTab('tab2', [
{text: 'Display a feed'},
{text: 'Dropdown item1'},
{text: 'Dropdown item2'},
{text: 'Dropdown item3'}
]);
var tabView = new UWA.Controls.TabView({
tabs: [
{name: 'tab1', text: 'Tab one'},
dropdownTab
]
}).inject(widget.body);
tabView.selecteTab(dropdownTab);
Parameters
Name | Type | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
String | Tab name. |
||||||||||
items |
Array.<Object> | An array of Tab menu items. |
||||||||||
options |
Object | Options hash or a option/value pair. Properties
|
Extends
- UWA.Controls.TabView.Tab
Index
Methods
-
setSelected() → {DropdownTab}
-
Overrides base method. When the tab is beeing selected, show the dropdown mark, otherwise hide it.
Returns
Fluent interface.
- Type
- DropdownTab
-
togglePopupMenu() → {Boolean}
-
Display or hide PopupMenu.
Returns
true
if displayed elsefalse
.- Type
- Boolean
-
showPopupMenu()
-
Display popup menu for this tab.
-
hidePopupMenu(e)
-
Hide PopupMenu.
Parameters
Name Type Description e
Event -
createPopupMenu() → {HTMLElement}
-
Create PopupMenu container.
Returns
PopPupMenu container
- Type
- HTMLElement
-
selectItem(item, tabView, selectTab)
-
Select a popup menu item.
Example
tab.selectItem('url', feedUrl); // Select item by property tab.selectItem(item, feedUrl);
Parameters
Name Type Argument Default Description item
Object Tab item such as {text: 'menu item1'}
tabView
TabView TabView instance
selectTab
Boolean <optional>
true true
to select tab if not selected