UITextField
The UITextField
component represents a text input field.
class UITextField
extends
UIControl
Represents a text field component.
Constructor
(): UITextField
.withName() static
(name: string,
placeholder
?:
Stringable
): typeof UITextField
Creates a preset text field class with given name and placeholder, if any.
.isFocusable()
(): boolean
Returns true if this component can be focused directly using mouse or touch, or manually using UIComponent.requestFocus
. This method may be overridden by derived component classes, but the return value must be constant for each instance.
.isKeyboardFocusable()
(): boolean
Returns true if this component can be focused using the keyboard as well as using other methods (rather than direct manipulation only). This method may be overridden by derived component classes, but the return value must be constant for each instance.
.type
string
Input type as string, defaults to text
.
.multiline
boolean
Set to true to enable multiline input; also suppresses the EnterKeyPress event.
.placeholder
Placeholder text.
.value
string
Input value.
.name
string
Form context property name.
.formContext
UIFormContext
<any>
Bound form context, if any.
.applyStyle() protected
(style?:
UIStyle
): void
Inherited from UIControl.applyStyle
.
.textStyle
Readonly<TextStyle>
Inherited from UIControl.textStyle
.
.decoration
Readonly<Decoration>
Inherited from UIControl.decoration
.
.disabled
boolean
Inherited from UIControl.disabled
.
.shrinkwrap
boolean
Inherited from UIControl.shrinkwrap
.
.propagateComponentEvent() deprecated
(name: string, inner?:
ManagedEvent
, event?: any): void
Inherited from UIComponent.propagateComponentEvent
.
.delegateEvent() protected
(e:
ManagedEvent
, propertyName: string): true
Inherited from UIComponent.delegateEvent
.
.render()
(callback: RenderCallback<Output<
UIRenderable
, any>>): void
Inherited from UIComponent.render
.
.requestFocus()
(): void
Inherited from UIComponent.requestFocus
.
.requestFocusNext()
(): void
Inherited from UIComponent.requestFocusNext
.
.requestFocusPrevious()
(): void
Inherited from UIComponent.requestFocusPrevious
.
.style
Inherited from UIComponent.style
.
.hidden
boolean
Inherited from UIComponent.hidden
.
.dimensions
Readonly<Dimensions>
Inherited from UIComponent.dimensions
.
.position
Readonly<Position>
Inherited from UIComponent.position
.
.accessibleRole
string
Inherited from UIComponent.accessibleRole
.
.accessibleLabel
string
Inherited from UIComponent.accessibleLabel
.
.lastRenderOutput
Output<this, any>
Inherited from UIComponent.lastRenderOutput
.
.isPresetComponent() protected
(): boolean
Inherited from Component.isPresetComponent
.
.getParentComponent()
<TParent extends Component = Component>(ParentClass?:
ComponentConstructor
<TParent>): TParent
Inherited from Component.getParentComponent
.
.getBoundParentComponent()
<TParent extends Component>(ParentClass?:
ComponentConstructor
<TParent>): TParent
Inherited from Component.getBoundParentComponent
.
.emitAction()
(name: string, inner?:
ManagedEvent
, context?:
ManagedObject
): void
Inherited from Component.emitAction
.
.managedId
number
Inherited from ManagedObject.managedId
.
.managedState
Inherited from ManagedObject.managedState
.
.getReferenceCount() protected
(): number
Inherited from ManagedObject.getReferenceCount
.
.getManagedReferrers() protected
():
ManagedObject
[]
Inherited from ManagedObject.getManagedReferrers
.
.getManagedParent() protected
<TParent extends ManagedObject = ManagedObject>(ParentClass?:
ManagedObjectConstructor
<TParent>): TParent
Inherited from ManagedObject.getManagedParent
.
.emit()
<TEvent extends ManagedEvent = ManagedEvent, TConstructorArgs extends any[] = any[]>(e: string | TEvent | (new (...args: TConstructorArgs) => TEvent), ...constructorArgs: TConstructorArgs): this
Inherited from ManagedObject.emit
.
.emitChange()
(name?: string): void
Inherited from ManagedObject.emitChange
.
.propagateChildEvents() protected deprecated
(...types: ((new (...args: any[]) =>
ManagedEvent
) | ((e:
ManagedEvent
) => any))[]): this
Inherited from ManagedObject.propagateChildEvents
.
.activateManagedAsync() protected
(): Promise<any>
Inherited from ManagedObject.activateManagedAsync
.
.deactivateManagedAsync() protected
(): Promise<void>
Inherited from ManagedObject.deactivateManagedAsync
.
.destroyManagedAsync() protected
(): Promise<void>
Inherited from ManagedObject.destroyManagedAsync
.
.onManagedStateActivatingAsync() protected
(): Promise<void>
Inherited from ManagedObject.onManagedStateActivatingAsync
.
.onManagedStateActiveAsync() protected
(): Promise<void>
Inherited from ManagedObject.onManagedStateActiveAsync
.
.onManagedStateDeactivatingAsync() protected
(): Promise<void>
Inherited from ManagedObject.onManagedStateDeactivatingAsync
.
.onManagedStateInactiveAsync() protected
(): Promise<void>
Inherited from ManagedObject.onManagedStateInactiveAsync
.
.onManagedStateDestroyingAsync() protected
(): Promise<void>
Inherited from ManagedObject.onManagedStateDestroyingAsync
.
UITextField.Presets
extends
UIControl.Presets
UITextField presets type, for use with Component.with
.
.type
string
Input type as string, defaults to text
.
.multiline
boolean
Set to true to enable multiline input.
.placeholder
Placeholder text.
.value
Input value.
.name
string
Form state property.
.textStyle
Partial<{} | TextStyle>
Inherited from UIControl.Presets.textStyle
.
.decoration
Partial<{} | Decoration>
Inherited from UIControl.Presets.decoration
.
.disabled
boolean
Inherited from UIControl.Presets.disabled
.
.shrinkwrap
boolean
Inherited from UIControl.Presets.shrinkwrap
.
.style
string |
UIStyle
Inherited from UIComponent.Presets.style
.
.hidden
boolean
Inherited from UIComponent.Presets.hidden
.
.dimensions
Partial<{} | Dimensions>
Inherited from UIComponent.Presets.dimensions
.
.position
Partial<{} | Position>
Inherited from UIComponent.Presets.position
.
.accessibleRole
string
Inherited from UIComponent.Presets.accessibleRole
.
.accessibleLabel
string
Inherited from UIComponent.Presets.accessibleLabel
.
.requestFocus
boolean
Inherited from UIComponent.Presets.requestFocus
.
UITextField.InputType
type
InputType = "text" | "password" | "number" | "date" | "color";
Standardized input type names.