autoLayout not working on TurboTable

UI Components for Angular
Post Reply
Posts: 65
Joined: 13 Dec 2017, 19:01

10 Apr 2018, 18:44

I can't get autoLayout to work. All the columns have the same width, regardless of content and the browser width.

I've tried [autoLayout]="true" as well as autoLayout="true". Neither works.

I'm using primeng 5.2.4

Here is my html:

Code: Select all

        <div style="padding: 15px; padding-bottom: 0px">
            <button pButton
                    label="Add New"
                    [routerLink]="['/users/edit', 0]"></button>
    <p-table [columns]="cols"
        <ng-template pTemplate="header" let-columns>
                <th *ngFor="let col of columns">
        <ng-template pTemplate="body" let-rowData let-columns="columns">
            <tr [pSelectableRow]="rowData">
                <td *ngFor="let col of columns" style="text-align: center">
                    {{col.field == 'isActive' ? (rowData[col.field] ? 'Yes' : 'No'): rowData[col.field] }}
Last edited by aflorin on 11 Apr 2018, 21:02, edited 1 time in total.

Posts: 65
Joined: 13 Dec 2017, 19:01

11 Apr 2018, 21:02

The problem seems to occur if you set the table to scrollable. If you set it to use pages, autolayout works correctly

Posts: 1
Joined: 11 Jul 2019, 17:14

11 Jul 2019, 17:18

But if I need to use both - [scrollable]="true" and [autoLayout]="true", what should I do? Thanks

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests