class UIComponent
Base class for built-in UI components.
abstract
class UIComponent extends View
Description
This class provides common infrastructure for UI components such as UIButton and UIColumn. The UIComponent class is an abstract class and can’t be instantiated or rendered on its own.
UI components can be constructed directly using new
, but are often created as part of a ‘preset’ view hierarchy that’s defined using JSX or ui factory functions, e.g.
Type Members
- type UIComponent.Position staticOptions for component positioning within their parent component(s).
- type UIComponent.Offsets staticType definition for a measurement applied to padding, margin, or border thickness.
- type UIComponent.DimensionsStyleType staticOptions for component dimensions.
- type UIComponent.DecorationStyleType staticOptions for the appearance of UI components.
- type UIComponent.TextStyleType staticOptions for typography used on UI components.
Instance Members
- applyViewPreset(preset)Applies the provided preset properties to this object.
- 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.
Inherited Members
- 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.