TreeTable empty - data cofirmed

UI Components for Angular
Post Reply
ascribner-schwab
Posts: 1
Joined: 15 Nov 2018, 17:38

15 Nov 2018, 17:45

I simply cannot render data in this control and stuck as to why it does not work. What am I missing here?

HTML

Code: Select all

<p-treeTable [value]="treeData">
    <ng-template pTemplate="header">
        <tr>
            <th>Symbol</th>
            <th>Description</th>
            <th>Number</th>
        </tr>
    </ng-template>
    <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
        <tr>
            <td>
                <p-treeTableToggler [rowNode]="rowNode"></p-treeTableToggler>
                {{rowData.number}}
            </td>
            <!-- <td>{{rowData.symbol}}</td> -->
            <td>Some Data</td>
            <td>{{rowData.description}}</td>
        </tr>
    </ng-template>
</p-treeTable>
Component

Code: Select all

    @Input() orders: Observable<Order[]>;
    @Output() orderNumber: number;
    public treeData: TreeNode[] =  [];

    constructor() { }

    ngOnInit() {
        let i = 0;
        this.orders.subscribe(response => {
            response.forEach(order => {
                const node = new OrderTreeeNode();
                node.data = order;
                this.treeData.push(node);
                console.log(`${this.treeData[i].data.number} | ${this.treeData[i].data.symbol}`);
                i++;
            });
        });
    }
Console Log

Code: Select all

7195001684 | ISF
4590964079 | NFBK
1540987734 | DXTR
4263451069 | CEL
3386799931 | AXR
8787102842 | EGAN
3111256227 | HYT
3708511028 | LBIX
1174836272 | IMOS
0985274738 | MSCI
5898114839 | RNWK
9225599707 | EVOL
7839239974 | MTX
4154445004 | FSBC
6619791163 | MOG.B
9227704107 | MMT
5069938114 | NGHCN
0028977317 | RVLT
0427909195 | CEA
0709094175 | VVR
4443473995 | PTHN
7453043878 | SNA
9368326742 | MS^A
2932955951 | KOP
2212997488 | ECPG
0532317625 | AMTX
4771575325 | CSS
1522210937 | SWIR
6015233967 | FTRPR
6684715930 | FULLL

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 20 guests