SeverDataSource not fetching rows.
- 主要語言
- TypeScript
- 星號
- 1.6k
- 分支
- 867
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Edit:
it seems that when changing from templateUrl to template the server data source works.
For some reason, my serverdatasource won't fetch rows from the DB.
the api code returns an array of objects.
the exact same query works with LocalDataSource if i fetch the rows manually.
I have a serverdatasource defined as such:
```
@Component({
templateUrl: 'dashboard.component.html'
})
export class DashboardComponent {
source: ServerDataSource;
settings = {
columns: {
Timestamp: {
title: 'TimeStamp'
},
Machine: {
title: 'Machine'
},
Severity: {
title: 'Severity'
},
Status: {
title: 'Message'
},
info: {
title: '',
type: 'custom',
renderComponent: ButtonViewComponent,
onComponentInitFunction(instance) {
instance.save.subscribe(row => {
alert(`${row.Machine} saved!`)
});
},
filter: false
},
}
};
constructor(private http: Http) {
this.source = new ServerDataSource(this.http, {endPoint: `https://localhost/Log?amount=20`});
}
```
And my html template as such:
```
```
Can anyone tell me what is the problem ?
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。