我的ngx数据表行详细信息有问题。
一切似乎都正常,所有列和行都响应迅速。当我打开行详细信息时,它们显示得很好。但是,如果我更改浏览器的宽度,则细节将不会随行和列而缩放。根据页面的首次加载,它具有初始固定宽度。我似乎无法更改它。有什么建议么?

css - 带有Flex模式的Ngx数据表响应行详细信息-LMLPHP

css - 带有Flex模式的Ngx数据表响应行详细信息-LMLPHP

css - 带有Flex模式的Ngx数据表响应行详细信息-LMLPHP

 <ngx-datatable
    #myTable
    class="material"
    [columnMode]="'flex'"
    [headerHeight]="50"
    [footerHeight]="50"
    [rowHeight]="'auto'"
    [rows]="details">
    <ngx-datatable-row-detail [rowHeight]="100" #myDetailRow (toggle)="onDetailToggle($event)" flex>
      <ng-template let-row="row" let-expanded="expanded" ngx-datatable-row-detail-template >
        <div style="padding-left:35px;">
          <div><strong>Address Address Address Address Address AddressAddressAddress Address Address Address Address Address</strong></div>
        </div>
      </ng-template>
    </ngx-datatable-row-detail>
    <ngx-datatable-column name="Name" [flexGrow]="1">
      <ng-template let-row="row" let-expanded="expanded" ngx-datatable-cell-template>
          <a
          [class.datatable-icon-right]="!expanded"
          [class.datatable-icon-down]="expanded"
          title="Expand/Collapse Row"
          (click)="toggleExpandRow(row)">aaa
        </a>
      </ng-template>
    </ngx-datatable-column>
    <ngx-datatable-column name="Name" [flexGrow]="1">
      <ng-template let-row="row" ngx-datatable-cell-template>
        testing 3
      </ng-template>
    </ngx-datatable-column>
    <ngx-datatable-column name="Gender" [flexGrow]="5">
      <ng-template let-row="row" let-value="value" ngx-datatable-cell-template>
        testing
      </ng-template>
    </ngx-datatable-column>
    <ngx-datatable-column name="Age" [flexGrow]="5">
      <ng-template let-row="row" ngx-datatable-cell-template>
        testingsecond
      </ng-template>
    </ngx-datatable-column>
  </ngx-datatable>

最佳答案

:host ::ng-deep .ngx-datatable .datatable-body .datatable-scroll {
  display: inherit;
}


在这种情况下有效

关于css - 带有Flex模式的Ngx数据表响应行详细信息,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51378370/

10-09 21:17