|
380 | 380 |
|
381 | 381 | <!-- Coluna criada para caso as ações fiquem no lado esquerdo -->
|
382 | 382 | <th
|
383 |
| - *ngIf="!actionRight && (visibleActions.length > 1 || isSingleAction)" |
| 383 | + *ngIf="hasVisibleActions && hideColumnsManager && !actionRight" |
384 | 384 | [class.po-table-header-master-detail]="!isSingleAction"
|
385 | 385 | [class.po-table-header-single-action]="isSingleAction"
|
386 | 386 | ></th>
|
387 | 387 |
|
| 388 | + <th |
| 389 | + #columnManagerLeft |
| 390 | + *ngIf="hasValidColumns && !hideColumnsManager && !actionRight" |
| 391 | + [class.po-table-header-column-manager]="!isSingleAction || !hasVisibleActions" |
| 392 | + [class.po-table-header-column-manager-border]="!height && container" |
| 393 | + [class.po-table-header-single-action]="isSingleAction" |
| 394 | + > |
| 395 | + <div |
| 396 | + [class.po-table-header-column-manager-border]="height && container" |
| 397 | + [class.po-table-header-column-manager-fixed-inner]="height" |
| 398 | + [style.width.px]="height && visibleActions.length ? columnManagerLeft.offsetWidth : undefined" |
| 399 | + > |
| 400 | + <button |
| 401 | + #columnManagerTargetLeft |
| 402 | + class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable" |
| 403 | + p-tooltip-position="left" |
| 404 | + [p-tooltip]="literals.columnsManager" |
| 405 | + (click)="onOpenColumnManager()" |
| 406 | + ></button> |
| 407 | + </div> |
| 408 | + </th> |
| 409 | + |
388 | 410 | <th *ngIf="!hasMainColumns" #noColumnsHeader class="po-table-header-column po-text-center">
|
389 | 411 | <ng-container *ngIf="height; then noColumnsWithHeight; else noColumnsWithoutHeight"> </ng-container>
|
390 | 412 | </th>
|
|
422 | 444 | ></th>
|
423 | 445 |
|
424 | 446 | <th
|
425 |
| - #columnManager |
426 |
| - *ngIf="hasValidColumns && !hideColumnsManager" |
427 |
| - [class.po-table-header-column-manager]="!isSingleAction || !actionRight" |
| 447 | + #columnManagerRight |
| 448 | + *ngIf="hasValidColumns && !hideColumnsManager && actionRight" |
| 449 | + [class.po-table-header-column-manager]="!isSingleAction" |
428 | 450 | [class.po-table-header-column-manager-border]="!height && container"
|
429 |
| - [class.po-table-header-single-action]="isSingleAction && actionRight" |
| 451 | + [class.po-table-header-single-action]="isSingleAction" |
430 | 452 | >
|
431 | 453 | <div
|
432 | 454 | [class.po-table-header-column-manager-border]="height && container"
|
433 | 455 | [class.po-table-header-column-manager-fixed-inner]="height"
|
434 |
| - [style.width.px]="height && visibleActions.length ? columnManager.offsetWidth : undefined" |
| 456 | + [style.width.px]="height && visibleActions.length ? columnManagerRight.offsetWidth : undefined" |
435 | 457 | >
|
436 | 458 | <button
|
437 |
| - #columnManagerTarget |
438 |
| - [attr.aria-label]="literals.columnsManager" |
| 459 | + #columnManagerTargetRight |
439 | 460 | class="po-table-header-column-manager-button po-icon po-icon-settings po-clickable"
|
440 | 461 | p-tooltip-position="left"
|
441 | 462 | [p-tooltip]="literals.columnsManager"
|
|
483 | 504 | >
|
484 | 505 | </ng-template>
|
485 | 506 |
|
| 507 | + <!-- Coluna para não ficar em branco nas linhas de gerenciamento --> |
| 508 | + <ng-container *ngIf="!actionRight && !hasVisibleActions && !hideColumnsManager"> |
| 509 | + <td class="po-table-column"></td> |
| 510 | + </ng-container> |
| 511 | + |
486 | 512 | <!-- Valida se a origem do detail é pela diretiva -->
|
487 | 513 | <td
|
488 | 514 | *ngIf="hasRowTemplate && !hasRowTemplateWithArrowDirectionRight"
|
|
718 | 744 | </ng-template>
|
719 | 745 |
|
720 | 746 | <po-table-column-manager
|
721 |
| - *ngIf="!hideColumnsManager" |
| 747 | + *ngIf="!hideColumnsManager && actionRight" |
| 748 | + [p-columns]="columns" |
| 749 | + [p-max-columns]="maxColumns" |
| 750 | + [p-target]="columnManagerTargetRight" |
| 751 | + [p-last-visible-columns-selected]="lastVisibleColumnsSelected" |
| 752 | + (p-visible-columns-change)="onVisibleColumnsChange($event)" |
| 753 | + (p-change-visible-columns)="onChangeVisibleColumns($event)" |
| 754 | +> |
| 755 | +</po-table-column-manager> |
| 756 | + |
| 757 | +<po-table-column-manager |
| 758 | + *ngIf="!hideColumnsManager && !actionRight" |
722 | 759 | [p-columns]="columns"
|
723 | 760 | [p-max-columns]="maxColumns"
|
724 |
| - [p-target]="columnManagerTarget" |
| 761 | + [p-target]="columnManagerTargetLeft" |
725 | 762 | [p-last-visible-columns-selected]="lastVisibleColumnsSelected"
|
726 | 763 | (p-visible-columns-change)="onVisibleColumnsChange($event)"
|
727 | 764 | (p-change-visible-columns)="onChangeVisibleColumns($event)"
|
|
0 commit comments