Class type Goog.Ui.select
class type select = object..end
Inherits
method enterDocument : unit Js.meth
Configures the component after its DOM has been rendered, and sets up event handling. Overrides goog.ui.MenuButton#enterDocument.
method decorateInternal :
'a. (#Dom_html.element as 'a) Js.t -> unit Js.meth
Decorates the given element with this control. Overrides the superclass implementation by initializing the default caption on the select button.
method disposeInternal : unit Js.meth
method handleMenuAction :
'b. (#Goog.Events.event as 'b) Js.t -> unit Js.meth
Handles goog.ui.Component.EventType.ACTION events dispatched by the menu item clicked by the user. Updates the selection model, calls the superclass implementation to hide the menu, stops the propagation of the event, and dispatches an ACTION event on behalf of the select control itself. Overrides goog.ui.MenuButton#handleMenuAction.
method handleSelectionChange :
'c. (#Goog.Events.event as 'c) Js.t -> unit Js.meth
Handles goog.events.EventType.SELECT events raised by the selection model when the selection changes. Updates the contents of the select button.
method setMenu : menu Js.t -> menu Js.t Js.optdef Js.meth
Replaces the menu currently attached to the control (if any) with the given
argument, and updates the selection model. Does nothing if the new menu is
the same as the old one. Overrides goog.ui.MenuButton#setMenu.
Returns Previous menu (undefined if none).
method getDefaultCaption : controlContent Js.meth
Returns the default caption to be shown when no option is selected.
Returns Default caption.
method setDefaultCaption : controlContent -> unit Js.meth
Sets the default caption to the given string or DOM structure.
method addItem_ :
'd 'e.
((#menuItem as 'd) Js.t, (#menuSeparator as 'e) Js.t)
Goog.Tools.Union.t -> unit Js.meth
Adds a new menu item at the end of the menu.
method addItemAt :
'f 'g.
((#menuItem as 'f) Js.t, (#menuSeparator as 'g) Js.t)
Goog.Tools.Union.t -> int -> unit Js.meth
Adds a new menu item at a specific index in the menu.
method removeItem : menuItem Js.t -> unit Js.meth
Removes an item from the menu and disposes it.
method removeItemAt : int -> unit Js.meth
Removes a menu item at a given index in the menu and disposes it.
method setSelectedItem : menuItem Js.t -> unit Js.meth
Selects the specified option (assumed to be in the select menu), and deselects the previously selected option, if any. A null argument clears the selection.
method setSelectedIndex : int -> unit Js.meth
Selects the option at the specified index, or clears the selection if the index is out of bounds.
method getSelectedItem : menuItem Js.t Js.meth
Returns the currently selected option.
Returns The currently selected option (null if none).
method getSelectedIndex : int Js.meth
Returns the index of the currently selected option.
Returns 0-based index of the currently selected option (-1 if none).
method setOpen : bool Js.t -> unit Js.meth
Opens or closes the menu. Overrides goog.ui.MenuButton#setOpen by highlighting the currently selected option on open.
