角材料扩展面板中的下拉菜单被切除

问题描述

我在Angular材质扩展面板中遇到此问题。分页下拉菜单的一部分被切除。如何使下拉菜单与扩展面板的末端重叠?我尝试z-index无济于事。

材质手风琴内部有三个面板。

Material Expansion Accordeon with three Panels.

Cut off dropdown.

以下是相关代码:

<mat-accordion class="example-headers-align" multi>
            <mat-expansion-panel hideToggle>
              <mat-expansion-panel-header>
                <mat-panel-title>
                Title
                </mat-panel-title>
              </mat-expansion-panel-header>
              <p-table
                #dt
                [columns]="cols"
                [value]="tableDataSummary"
                [paginator]="false"
                scrollable="true"
                sortMode="multiple"
                [resizableColumns]="true"
                [rowHover]="true"
                [rows]="10"
                scrollable="true"
                resizableColumns="true"
                [rowsPerPageOptions]="[10,100]"
                appendTo="body"
                [paginator]="true"
              >
                <ng-template pTemplate="header" let-columns>
                  <tr>
                    <th pSortableColumn="col" *ngFor="let col of columns">
                      {{col.header}}
                    </th>
                  </tr>
                  <tr>
                    <th
                      *ngFor="let col of columns"
                      [ngSwitch]="col.field"
                      [pSortableColumn]="col.field"
                    >
                      <p-sortIcon [field]="'col.field'"></p-sortIcon>
                    </th>
                  </tr>
                </ng-template>
                <ng-template pTemplate="body" let-rowData let-columns="columns">
                  <tr [pSelectableRow]="rowData">
                    <td
                      *ngFor="let col of columns"
                      style="line-break: anywhere;"
                    >
                      <span
                        *ngIf="col.field === 'TR' || col.field === 'TwR' || col.field === 'FT'; else elseBlock"
                        [ngClass]="rowData[col.field] > 0.10 ? 'red' : null"
                      >
                        {{ rowData[col.field] | percent:'1.0-2' }}
                      </span>
                      <ng-template #elseBlock>
                        {{ rowData[col.field] }}
                      </ng-template>
                    </td>
                  </tr>
                </ng-template>
                <ng-template pTemplate="paginatorleft" let-state>
                  Showing {{(state.page * state.rows) + 1}} to {{state.rows *
                  (state.page + 1)}} of {{state.totalRecords}}
                </ng-template>
              </p-table>
            </mat-expansion-panel>

谢谢!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...