Docs (4.0.0)
class ManagedList method

replace

Replaces (or moves) all items in this list with the specified items.

replace(objects: Iterable<T | undefined>): this

Notes

  • Existing items can be moved within the list if they’re included in the new list of objects.
  • Items that aren’t included in the provided list are removed from the managed list.
  • Items in the provided list that are not yet in the managed list are added such that the order of items matches that of the provided list.

Parameters

  • objects — The objects that this list should contain; either in an array or another ManagedList instance

Related