@umbraco-cms/backoffice

    Function filterFrozenArray

    • Function

      filterFrozenArray

      Type Parameters

      • T

      Parameters

      • data: T[]

        RxJS Subject to use for this Observable.

      • filterMethod: (entry: T) => boolean

        Method to filter the array.

      Returns T[]

      • Creates a RxJS Observable from RxJS Subject.

      Example: Example remove an entry of a ArrayState or a part of DeepState/ObjectState it which is an array. Where the key is unique and the item will be updated if matched with existing.

      const newDataSet = filterFrozenArray(myState.getValue(), x => x.id !== "myKey");
      myState.setValue(newDataSet);
    MMNEPVFCICPMFPCPTTAAATR