Catching loading event
- 主要语言
- TypeScript
- 星标
- 1.6k
- 派生
- 867
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hello,
I want to make a spinner indicating data being refreshed. But how can I catch event for data being loaded?
Im getting data this way:
```
this.source = new ServerDataSource(http, { endPoint: 'https://jsonplaceholder.typicode.com/photos' });
```
I tried to user LocalDataSource, and manually getting data on "onSearch":
```
getData(modifiedData?) {
this.loading = true;
let sourceCopy = modifiedData ? modifiedData : this.source;
let requestData = {
filter: sourceCopy.getFilter(),
paging: sourceCopy.getPaging(),
sort: sourceCopy.getSort()
}
this.service.getData(requestData).then((data) => {
this.source.load(data);
this.loading = false;
});
}
```
This works for search input, but this way I'd have to write pagination component on my own, while the stock one is just fine.
Any ideas?
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。