class UITextField
A view class that represents a text field control.
class UITextField extends UIComponent
Description
A text field component is rendered on-screen as a single-line (default) or multi-line input field.
Constructor
- constructor(placeholder?, value?)Creates a new text field view instance.
Type Members
- type UITextField.StyleType staticThe type definition for styles applicable to UITextField.style.
- type UITextField.InputType staticAn identifier for a text field input type.
- type UITextField.EnterKeyHintType staticAn identifier for a virtual keyboard ‘enter’ button type, used only on some devices.
Instance Members
- applyViewPreset(preset)Applies the provided preset properties to this object.
- valueThe current input value.
- placeholderThe text field placeholder text.
- multilineTrue if multiline input mode should be enabled.
- formFieldForm context field name, used with UIFormContext.
- typeThe input field type, defaults to
text
. - enterKeyHintAn optional type that determines the text to be displayed on touch screen ‘enter’ keys, where supported.
- disableSpellCheckTrue if spell and/or grammar checks should be disabled, where supported.
- formContextThe nearest containing form context.
- disabledTrue if user input should be disabled on this control.
- readOnlyTrue if the text field should appear like a label.
- widthTarget width of the text field, in pixels or CSS length with unit.
- styleThe style to be applied to the text field.
Inherited Members
- hiddenTrue if the component should be hidden from view.
- positionOptions related to the position of this component.
- accessibleRoleWAI-ARIA role for this component, if applicable.
- accessibleLabelWAI-ARIA label text for this component (not tooltip), if applicable.
- requestFocus()Requests input focus on this component.
- requestFocusNext()Requests input focus for the next sibling component.
- requestFocusPrevious()Requests input focus for the previous sibling component.
- render(callback)Triggers asynchronous rendering for this component, and all contained components, if any.
- findViewContent(type)Implementation of View.findViewContent(), returns an empty array unless overridden.
- lastRenderOutputLast rendered output, if any; set by the UI component renderer.
- emit(event)Emits an event, immediately calling all event handlers.
- emitChange(name?, data?)Emits a change event, an instance of ManagedChangeEvent.
- listen(handler)Adds a handler for all events emitted by this object.
- isUnlinked()Returns true if the object has been unlinked.
- unlink()Unlinks this managed object.
- beforeUnlink() protectedA method that’s called immediately before unlinking an object, can be overridden.
- attach(target, observer?) protectedAttaches the provided managed object to this object.
- autoAttach(propertyName, observer?) protectedObserves a property, so that any object assigned to it is attached immediately.