Hello I'm tryng to populate ng2-smart-table with array of numbers but currently I'm getting table with 6 empty rows like this:
Code for table:
<ng2-smart-table [settings]="settings" [source]="flowTabs">
</ng2-smart-table>
public settings: any = {
pager: {
display: true,
perPage: 20,
},
actions: {
add: false,
edit: false,
delete: false,
},
columns: {
naziv: {
title: 'Naziv',
type: 'string',
}
},
noDataMessage: 'Nema dostupnih podataka'
}
Fetching array:
public getRootIds(): void {
this.loadingData = true;
this.documentFlowService.getRootIds()
.pipe(takeUntil(this.destroy$))
.subscribe((data: number[]) => {
this.flowTabs = data;
this.loadingData = false;
},
err => {
console.error(err);
this.loadingData = false;
})
}
Appreciate if someone can advise. Thank you in advance!