@wpkernel/ui / DataViewInteractionResult
Interface: DataViewInteractionResult<TItem, TQuery>
Contract returned by createDataViewInteraction that exposes the controller, underlying interaction, and convenience helpers to inspect and mutate the bridge state.
Extends
DefinedInteraction<InteractivityStoreResult>
Type Parameters
TItem
TItem
The resource record type handled by the DataView controller.
TQuery
TQuery
The query payload shape produced by the DataView controller.
Properties
controller
ts
readonly controller: ResourceDataViewController<TItem, TQuery>;The resolved DataView controller bound to the interaction.
getServerState()
ts
readonly getServerState: () => object;Returns
object
Inherited from
ts
DefinedInteraction.getServerStategetState()
ts
readonly getState: () => DataViewInteractionState<TQuery>;Returns the latest computed DataView interaction state.
Returns
DataViewInteractionState<TQuery>
namespace
ts
readonly namespace: string;Inherited from
ts
DefinedInteraction.namespacesetSelection()
ts
readonly setSelection: (selection) => void;Updates the mirrored selection state. Useful for synchronising custom UI elements that mutate the DataView selection outside controller events.
Parameters
selection
(string | number)[]
Returns
void
store
ts
readonly store: TStoreResult;Inherited from
ts
DefinedInteraction.storesyncServerState()
ts
readonly syncServerState: () => void;Returns
void
Inherited from
ts
DefinedInteraction.syncServerStateteardown()
ts
readonly teardown: () => void;Restores controller emitters to their original implementations.
Returns
void
