Skip to main content

LifecycleCollection<Serialized, Model>

Wraps an existing collection with data-to-model conversion, and is smart about creating / patching and deleting models based on how the wrapping collection loads items

Type Parameters

Type Parameter
Serialized
Model extends LifecycleModel<Serialized>

Constructors

Constructor

new LifecycleCollection<Serialized, Model>(options): LifecycleCollection<Serialized, Model>;

Parameters

ParameterType
optionsLifecycleCollectionOptions<Serialized, Model>

Returns

LifecycleCollection<Serialized, Model>

Properties

PropertyType
reactionIReactionDisposer

Accessors

_items


collection

Get Signature

get collection(): Collection<Serialized>;
Returns

Collection<Serialized>


items

Get Signature

get items(): Model[];
Returns

Model[]


loading

Get Signature

get loading(): boolean;
Returns

boolean

Methods

dispose()

dispose(): void;

Returns

void