WP Kernel API / @wpkernel/ui / ResourceDataViewControllerOptions
Interface: ResourceDataViewControllerOptions<TItem, TQuery>
Type Parameters
TItem
TItem
TQuery
TQuery
Properties
resource?
ts
optional resource: ResourceObject<TItem, TQuery>;
resourceName?
ts
optional resourceName: string;
config
ts
config: ResourceDataViewConfig<TItem, TQuery>;
queryMapping?
ts
optional queryMapping: QueryMapping<TQuery>;
runtime
ts
runtime: DataViewsControllerRuntime;
namespace
ts
namespace: string;
invalidate()?
ts
optional invalidate: (patterns) => void;
Parameters
patterns
CacheKeyPattern
| CacheKeyPattern
[]
Returns
void
policies?
ts
optional policies: KernelUIPolicyRuntimeSource;
preferencesKey?
ts
optional preferencesKey: string;
fetchList()?
ts
optional fetchList: (query) => Promise<ListResponse<TItem>>;
Parameters
query
TQuery
Returns
Promise
<ListResponse
<TItem
>>
prefetchList()?
ts
optional prefetchList: (query) => Promise<void>;
Parameters
query
TQuery
Returns
Promise
<void
>