Class DynArrayReducerDerived<T>

    Provides the base implementation derived reducer for arrays / DynArrayReducer.

    Note: That you should never directly create an instance of a derived reducer, but instead use the DynArrayReducerDerived.initialize callback to set up any initial state in a custom derived reducer.

    Type Parameters

    • T

    Implements

    Constructors

    Accessors

    • get data(): T[]
    • Returns the internal data of this instance. Be careful!

      Note: if an array is set as initial data then that array is used as the internal data. If any changes are performed to the data externally do invoke IDynIndexerAPI.update with true to recalculate the index and notify all subscribers.

      Returns T[]

      The internal data.

    Methods

    • Protected

      Provides a callback for custom derived reducers to initialize any data / custom configuration. This allows child classes to avoid implementing the constructor.

      Returns void

    Properties

    #array: DynDataHost<T[]>
    #derived: AdapterDerived<T[], number, T>
    #derivedPublicAPI: IDynDerivedAPI<T[], number, T>
    #destroyed: boolean = false
    #filters: AdapterFilters<T>
    #filtersData: {
        filters: DynDataFilter<T>[];
    } = ...

    Type declaration

    #index: ArrayIndexer<T>
    #indexPublicAPI: IndexerAPI<number, T>
    #reversed: boolean = false
    #sort: AdapterSort<T>
    #sortData: {
        compareFn: DynCompareFn<T>;
    } = ...

    Type declaration

    #subscriptions: Function[] = []