brows3r — TypeScript API
    Preparing search index...

    Class SelectionModel<_T>

    Stateful selection model backed by a Set<string> of item IDs.

    All mutating methods return a new SelectionModel instance (immutable update pattern) so React state triggers re-renders correctly.

    Type Parameters

    • _T = unknown
    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    ids: ReadonlySet<string>

    Accessors

    Methods

    • Select all items between anchor and target indices (inclusive) in items. Clears any prior selection and replaces it with the range.

      Type Parameters

      • T

      Parameters

      • anchor: number
      • target: number
      • items: T[]
      • getId: (item: T) => string

      Returns SelectionModel<_T>