Interface HasAsyncItems<C,S>
- Type Parameters:
C- the type of the component used for method chainingS- 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:
load()— first-time fetch, only runs when status isAsyncStatus.pending, idempotentrefresh()— re-fetch while keeping old items visible, then swap atomicallyreset()— clear all items and go back toAsyncStatus.pendingwithout fetching
-
Method Summary
Modifier and TypeMethodDescriptionadd(AsyncItems<C, S> items) default CaddItems(AsyncItems<C, S> items) load()Fetches items for the first time.refresh()Re-fetches items while keeping old items visible, then swaps them after the new items arrive.voidreset()Clears all items and sets status back toAsyncStatus.pending.status()
-
Method Details
-
addItems
-
add
-
load
Fetches items for the first time. Only runs when status isAsyncStatus.pending. Idempotent. -
refresh
-
reset
void reset()Clears all items and sets status back toAsyncStatus.pending. Does not fetch. -
status
AsyncStatus status()
-