Dropdown
Expression Extends:
class Dropdown extends mixin(BaseObject, ListenerOrganizerMixin)
A HTML Dropdown select. The text entries in the list can be setted and changed and given a click handler.
Constructor Summary
Public Constructor | ||
public |
constructor(options: DropdownOptions) |
Member Summary
Public Members | ||
public |
$element_: * |
|
public |
$ghostentry: jQuery |
|
public |
|
|
public |
fastMode_: * |
Private Members | ||
private |
|
|
private |
|
|
private |
|
|
private |
|
|
private |
|
Method Summary
Public Methods | ||
public |
Adds an entry to the end of the dropdown list |
|
public |
clear() Removes all entries |
|
public |
detach() |
|
public |
focus() |
|
public |
get$Element(): jQuery return the whole element |
|
public |
Returns the amount of dropdown entries |
|
public |
getText(): * returns the text of the current selected list element |
|
public |
getValue(): * returns the value of the selected list element |
|
public |
Returns true if the dropdown has selectable elements |
|
public |
select$Entry_($entry: *) |
|
public |
setActivated(value: *, active: *) |
|
public |
setEntries(values: any[], texts: string[]) This function takes an array of entries (strings). |
|
public |
setFastMode(value: *) |
|
public |
This function corrects the number of entries in the dropdown. |
|
public |
|
|
public |
|
|
public |
|
Private Methods | ||
private |
|
Public Constructors
public constructor(options: DropdownOptions) source
Params:
Name | Type | Attribute | Description |
options | DropdownOptions |
|
Public Members
public $element_: * source
public $ghostentry: jQuery source
public fastMode_: * source
Private Members
Public Methods
public addEntry(value: *, text: string, optSelected: boolean) source
Adds an entry to the end of the dropdown list
public detach() source
public focus() source
public select$Entry_($entry: *) source
Params:
Name | Type | Attribute | Description |
$entry | * |
public setActivated(value: *, active: *) source
Params:
Name | Type | Attribute | Description |
value | * | ||
active | * |
public setEntries(values: any[], texts: string[]) source
This function takes an array of entries (strings). The length of the dropdown is set to the length of the arrays (they have to have the same length).
Params:
Name | Type | Attribute | Description |
values | any[] | ||
texts | string[] |
|
public setFastMode(value: *) source
Params:
Name | Type | Attribute | Description |
value | * |
public setLength(length: number) source
This function corrects the number of entries in the dropdown. The content of the entries is not respected. New entries are slided down, to be removed entries are slided up then removed.
Params:
Name | Type | Attribute | Description |
length | number |
public showGhostEntry() source
public slideDown(immediately: boolean): Promise source
Params:
Name | Type | Attribute | Description |
immediately | boolean |
|
if setted to true the animation is skipped |
public slideUp(immediately: boolean): Promise source
Params:
Name | Type | Attribute | Description |
immediately | boolean |
|
if setted to true the animation is skipped |