refreshDataSource
Reloads the entire data set from the server, optionally applying new parameters. If the object is dirty beforeReload is invoked first.
If another request is still running when this method is called:
Parameters unchanged – the existing request continues and the returned promise resolves when that request completes.
Parameters changed – the in-flight request is aborted and a new one starts with the updated parameters.
Usage
await ds.refreshDataSource({
parameters: { whereClause: "ID > 10" },
});Options
parameters: Partial<RetrieveParameters> applied before loading; the values remain set on the data object.throw: Rejects the promise on failure whentrue; otherwise errors are emitted throughonDataLoadFailed.
API
type RefreshDataSourceOptions<T> = {
parameters?: Partial<RetrieveParameters<T>>;
throw?: boolean;
};
refreshDataSource(options?: RefreshDataSourceOptions<T>): Promise<void>;Last updated
Was this helpful?