|
378 | 378 |
|
379 | 379 | <!-- Coluna criada para caso as ações fiquem no lado esquerdo -->
|
380 | 380 | <th
|
381 |
| - *ngIf="!actionRight && (visibleActions.length > 1 || isSingleAction)" |
| 381 | + *ngIf="hasVisibleActions && hideColumnsManager && !actionRight" |
382 | 382 | [class.po-table-header-master-detail]="!isSingleAction"
|
383 | 383 | [class.po-table-header-single-action]="isSingleAction"
|
384 | 384 | ></th>
|
385 | 385 |
|
| 386 | + <th |
| 387 | + #columnManagerLeft |
| 388 | + *ngIf="hasValidColumns && !hideColumnsManager && !actionRight" |
| 389 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
| 390 | + [class.po-table-header-column-manager-border]="!height && container" |
| 391 | + [class.po-table-header-single-action]="isSingleAction" |
| 392 | + > |
| 393 | + <div |
| 394 | + [class.po-table-header-column-manager-border]="height && container" |
| 395 | + [class.po-table-header-column-manager-fixed-inner]="height" |
| 396 | + [style.width.px]="height && visibleActions.length ? columnManagerLeft.offsetWidth : undefined" |
| 397 | + > |
| 398 | + <button |
| 399 | + #columnManagerTargetLeft |
| 400 | + class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable" |
| 401 | + p-tooltip-position="left" |
| 402 | + [p-tooltip]="literals.columnsManager" |
| 403 | + (click)="onOpenColumnManager()" |
| 404 | + ></button> |
| 405 | + </div> |
| 406 | + </th> |
| 407 | + |
386 | 408 | <th *ngIf="!hasMainColumns" #noColumnsHeader class="po-table-header-column po-text-center">
|
387 | 409 | <ng-container *ngIf="height; then noColumnsWithHeight; else noColumnsWithoutHeight"> </ng-container>
|
388 | 410 | </th>
|
|
420 | 442 | ></th>
|
421 | 443 |
|
422 | 444 | <th
|
423 |
| - #columnManager |
424 |
| - *ngIf="hasValidColumns && !hideColumnsManager" |
425 |
| - [class.po-table-header-column-manager]="!isSingleAction || !actionRight" |
| 445 | + #columnManagerRight |
| 446 | + *ngIf="hasValidColumns && !hideColumnsManager && actionRight" |
| 447 | + [class.po-table-header-column-manager]="!isSingleAction" |
426 | 448 | [class.po-table-header-column-manager-border]="!height && container"
|
427 |
| - [class.po-table-header-single-action]="isSingleAction && actionRight" |
| 449 | + [class.po-table-header-single-action]="isSingleAction" |
428 | 450 | >
|
429 | 451 | <div
|
430 | 452 | [class.po-table-header-column-manager-border]="height && container"
|
431 | 453 | [class.po-table-header-column-manager-fixed-inner]="height"
|
432 |
| - [style.width.px]="height && visibleActions.length ? columnManager.offsetWidth : undefined" |
| 454 | + [style.width.px]="height && visibleActions.length ? columnManagerRight.offsetWidth : undefined" |
433 | 455 | >
|
434 | 456 | <button
|
435 |
| - #columnManagerTarget |
| 457 | + #columnManagerTargetRight |
436 | 458 | class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable"
|
437 | 459 | p-tooltip-position="left"
|
438 | 460 | [p-tooltip]="literals.columnsManager"
|
|
480 | 502 | >
|
481 | 503 | </ng-template>
|
482 | 504 |
|
| 505 | + <!-- Coluna para não ficar em branco nas linhas de gerenciamento --> |
| 506 | + <ng-container *ngIf="!actionRight && !hasVisibleActions && !hideColumnsManager"> |
| 507 | + <td class="po-table-column"></td> |
| 508 | + </ng-container> |
| 509 | + |
483 | 510 | <!-- Valida se a origem do detail é pela diretiva -->
|
484 | 511 | <td
|
485 | 512 | *ngIf="hasRowTemplate && !hasRowTemplateWithArrowDirectionRight"
|
|
709 | 736 | </ng-template>
|
710 | 737 |
|
711 | 738 | <po-table-column-manager
|
712 |
| - *ngIf="!hideColumnsManager" |
| 739 | + *ngIf="!hideColumnsManager && actionRight" |
| 740 | + [p-columns]="columns" |
| 741 | + [p-max-columns]="maxColumns" |
| 742 | + [p-target]="columnManagerTargetRight" |
| 743 | + [p-last-visible-columns-selected]="lastVisibleColumnsSelected" |
| 744 | + (p-visible-columns-change)="onVisibleColumnsChange($event)" |
| 745 | + (p-change-visible-columns)="onChangeVisibleColumns($event)" |
| 746 | +> |
| 747 | +</po-table-column-manager> |
| 748 | + |
| 749 | +<po-table-column-manager |
| 750 | + *ngIf="!hideColumnsManager && !actionRight" |
713 | 751 | [p-columns]="columns"
|
714 | 752 | [p-max-columns]="maxColumns"
|
715 |
| - [p-target]="columnManagerTarget" |
| 753 | + [p-target]="columnManagerTargetLeft" |
716 | 754 | [p-last-visible-columns-selected]="lastVisibleColumnsSelected"
|
717 | 755 | (p-visible-columns-change)="onVisibleColumnsChange($event)"
|
718 | 756 | (p-change-visible-columns)="onChangeVisibleColumns($event)"
|
|
0 commit comments