UIListCellAdapter

This component encapsulates a cell with a child view that may contain bindings to a list element.

class UIListCellAdapter

extends UIRenderableController<UICell>

Component that can be used as an adapter to render items in a UIListController. Instances are constructed using a single argument (a managed object from UIListController.items), and encapsulate a UICell component.

Encapsulated content can include bindings to the object, value, selected, and hovered properties.

Events of type ActionEvent are wrapped in an event of type UIListCellAdapterEvent, which contains references to the cell and current list item object or value. Events that are already of type UIListCellAdapterEvent are not wrapped a second time, i.e. event properties are specific to the innermost adapter.

Constructor

<TObject extends ManagedObject = ManagedObject>(object: TObject): UIListCellAdapter<TObject>

.object

TObject

The encapsulated object.

.value

any

The intrinsic value of the encapsulated object (result of valueOf() called on the original object).

.propagateComponentEvent() deprecated

(name: string, inner?: ManagedEvent): void

Create and emit a UIListCellAdapterEvent with given name and a reference to this component and its cell and object.

Deprecated: in v3.1.

.emitAction()

(name: string, inner?: ManagedEvent, context?: ManagedObject): void

Emit an an action event (overridden from Component.emitAction, to emit UIListCellAdapterEvent instead).

.delegateEvent() protected

(e: ManagedEvent, propertyName: string): true

Override event delegation, to delegate events of type UIListCellAdapterEvent, if not already wrapped.

.selected

boolean

True if the cell is currently selected (based on Select and Deselect events; read-only).

.hovered

boolean

True if the cell is currently hovered over using the mouse cursor (based on MouseEnter and MouseLeave events; read-only).

.requestFocus()

(): void

Request input focus on the current cell.

.requestFocusNext()

(): void

Request input focus for the next sibling cell.

.requestFocusPrevious()

(): void

Request input focus for the previous sibling cell.

.renderContext

UIRenderContext

Inherited from UIRenderableController.renderContext.

.content

TContent

Inherited from UIRenderableController.content.

.render()

(callback?: RenderCallback<Output<UIRenderable, any>>): void

Inherited from UIRenderableController.render.

.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.

.managedId

number

Inherited from ManagedObject.managedId.

.managedState

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.


UIListCellAdapter.Presets

type Presets = Omit<UICell.Presets, keyof EventPresets> & EventPresets;

UICell presets type, for use with Component.with.