Virtual insertion
dhilt opened this issue · comments
Currently the Adapter.insert
API allows only in-buffer insertions. Need to allow virtual insertions. Proposal is to add beforeIndex
and afterIndex
options:
export interface AdapterInsertOptions<Data = unknown> {
items: Data[];
before?: ItemsPredicate<Data>; // over Buffer only
after?: ItemsPredicate<Data>; // over Buffer only
beforeIndex?: number; // over Buffer and virtual
afterIndex?: number; // over Buffer and virtual
decrease?: boolean;
}
Only one of the before
, after
, beforeIndex
and afterIndex
options is allowed.
vscroll v1.4.0 is released