Interface HasAsyncItems<C,S>

Type Parameters:
C - the type of the component used for method chaining
S - the type of the items
All Known Implementing Classes:
FinderColumn, MenuList, TreeViewItem

public interface HasAsyncItems<C,S>
Represents a component that can asynchronously load and manage items.

The async lifecycle has three operations:

  • Method Details

    • addItems

      default C addItems(AsyncItems<C,S> items)
    • add

      C add(AsyncItems<C,S> items)
    • load

      elemental2.promise.Promise<Iterable<S>> load()
      Fetches items for the first time. Only runs when status is AsyncStatus.pending. Idempotent.
    • refresh

      elemental2.promise.Promise<Iterable<S>> refresh()
      Re-fetches items while keeping old items visible, then swaps them after the new items arrive.
    • reset

      void reset()
      Clears all items and sets status back to AsyncStatus.pending. Does not fetch.
    • status

      AsyncStatus status()