|
77 | 77 |
|
78 | 78 | <!-- Coluna criada para caso as ações fiquem no lado esquerdo -->
|
79 | 79 | <th
|
80 |
| - *ngIf="!actionRight && (visibleActions.length > 1 || isSingleAction)" |
| 80 | + *ngIf="hasVisibleActions && hideColumnsManager && !actionRight" |
81 | 81 | [class.po-table-header-master-detail]="!isSingleAction"
|
82 | 82 | [class.po-table-header-single-action]="isSingleAction"
|
83 | 83 | ></th>
|
84 | 84 |
|
| 85 | + <th |
| 86 | + #columnManagerLeft |
| 87 | + *ngIf="hasValidColumns && !hideColumnsManager && !actionRight" |
| 88 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
| 89 | + [class.po-table-header-column-manager-border]="!height && container" |
| 90 | + [class.po-table-header-single-action]="isSingleAction" |
| 91 | + > |
| 92 | + <div |
| 93 | + [class.po-table-header-column-manager-border]="height && container" |
| 94 | + [class.po-table-header-column-manager-fixed-inner]="height" |
| 95 | + [style.width.px]="height && visibleActions.length ? columnManagerLeft.offsetWidth : undefined" |
| 96 | + > |
| 97 | + <button |
| 98 | + #columnManagerTargetLeft |
| 99 | + class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable" |
| 100 | + p-tooltip-position="left" |
| 101 | + [p-tooltip]="literals.columnsManager" |
| 102 | + (click)="onOpenColumnManager()" |
| 103 | + ></button> |
| 104 | + </div> |
| 105 | + </th> |
| 106 | + |
85 | 107 | <th *ngIf="!hasMainColumns" #noColumnsHeader class="po-table-header-column po-text-center">
|
86 | 108 | <ng-container *ngIf="height; then noColumnsWithHeight; else noColumnsWithoutHeight"> </ng-container>
|
87 | 109 | </th>
|
|
119 | 141 | ></th>
|
120 | 142 |
|
121 | 143 | <th
|
122 |
| - #columnManager |
123 |
| - *ngIf="hasValidColumns && !hideColumnsManager" |
124 |
| - [class.po-table-header-column-manager]="!isSingleAction || !actionRight" |
| 144 | + #columnManagerRight |
| 145 | + *ngIf="hasValidColumns && !hideColumnsManager && actionRight" |
| 146 | + [class.po-table-header-column-manager]="!isSingleAction" |
125 | 147 | [class.po-table-header-column-manager-border]="!height && container"
|
126 |
| - [class.po-table-header-single-action]="isSingleAction && actionRight" |
| 148 | + [class.po-table-header-single-action]="isSingleAction" |
127 | 149 | >
|
128 | 150 | <div
|
129 | 151 | [class.po-table-header-column-manager-border]="height && container"
|
130 | 152 | [class.po-table-header-column-manager-fixed-inner]="height"
|
131 |
| - [style.width.px]="height && visibleActions.length ? columnManager.offsetWidth : undefined" |
| 153 | + [style.width.px]="height && visibleActions.length ? columnManagerRight.offsetWidth : undefined" |
132 | 154 | >
|
133 | 155 | <button
|
134 |
| - #columnManagerTarget |
| 156 | + #columnManagerTargetRight |
135 | 157 | class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable"
|
136 | 158 | p-tooltip-position="left"
|
137 | 159 | [p-tooltip]="literals.columnsManager"
|
|
179 | 201 | >
|
180 | 202 | </ng-template>
|
181 | 203 |
|
| 204 | + <!-- Coluna para não ficar em branco nas linhas de gerenciamento --> |
| 205 | + <ng-container *ngIf="!actionRight && !hasVisibleActions && !hideColumnsManager"> |
| 206 | + <td class="po-table-column"></td> |
| 207 | + </ng-container> |
| 208 | + |
182 | 209 | <!-- Valida se a origem do detail é pela diretiva -->
|
183 | 210 | <td
|
184 | 211 | *ngIf="hasRowTemplate && !hasRowTemplateWithArrowDirectionRight"
|
|
404 | 431 | </ng-template>
|
405 | 432 |
|
406 | 433 | <po-table-column-manager
|
407 |
| - *ngIf="!hideColumnsManager" |
| 434 | + *ngIf="!hideColumnsManager && actionRight" |
| 435 | + [p-columns]="columns" |
| 436 | + [p-max-columns]="maxColumns" |
| 437 | + [p-target]="columnManagerTargetRight" |
| 438 | + [p-last-visible-columns-selected]="lastVisibleColumnsSelected" |
| 439 | + (p-visible-columns-change)="onVisibleColumnsChange($event)" |
| 440 | + (p-change-visible-columns)="onChangeVisibleColumns($event)" |
| 441 | +> |
| 442 | +</po-table-column-manager> |
| 443 | + |
| 444 | +<po-table-column-manager |
| 445 | + *ngIf="!hideColumnsManager && !actionRight" |
408 | 446 | [p-columns]="columns"
|
409 | 447 | [p-max-columns]="maxColumns"
|
410 |
| - [p-target]="columnManagerTarget" |
| 448 | + [p-target]="columnManagerTargetLeft" |
411 | 449 | [p-last-visible-columns-selected]="lastVisibleColumnsSelected"
|
412 | 450 | (p-visible-columns-change)="onVisibleColumnsChange($event)"
|
413 | 451 | (p-change-visible-columns)="onChangeVisibleColumns($event)"
|
|
0 commit comments