Skip to main content

AlpineBatcher

还没翻译译自英文(tanstack.com)本页 26 段都还没译

Defined in: batcher/createBatcher.ts:18

A Batcher with framework-reactive selected state. All core methods remain available.

Extends

  • Omit<Batcher<TValue>, "options" | "setOptions">

Type Parameters

TValue

TValue

TSelected

TSelected = { }

Properties

options

options: Omit<Required<BatcherOptions<TValue>>, "initialState" | "key" | "onItemsChange" | "onExecute"> & Partial<Pick<Required<BatcherOptions<TValue>>, "initialState" | "key" | "onItemsChange" | "onExecute">> & AlpineBatcherOptions<TValue, TSelected>;

Defined in: batcher/createBatcher.ts:22


setOptions

setOptions: (options) => void;

Defined in: batcher/createBatcher.ts:23

Parameters

options

Partial<AlpineBatcherOptions<TValue, TSelected>>

Returns

void


state

readonly state: Readonly<TSelected>;

Defined in: batcher/createBatcher.ts:29

Selected state. Pass a selector to opt in; the default selection is an empty object.


subscribe

subscribe: AlpinePacerSubscribe<BatcherState<TValue>>;

Defined in: batcher/createBatcher.ts:27

Subscribes a child owner to selected state with automatic cleanup.