swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

Expanding all rows for row detail shows only 1 row when using [scrollbarV]="true" #1829

Open jsstomp opened 4 years ago

jsstomp commented 4 years ago

I'm submitting a ... (check one with "x")

[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter

Current behavior When using the datatable rowdetails example (http://swimlane.github.io/ngx-datatable/#row-details) and clicking on 'Expand All' only the top row is shown and the others 'dissapear' completely.

Expected behavior All rows should be expanded even if [scrollbarV]="true".

Reproduction of the problem Please check official example at: http://swimlane.github.io/ngx-datatable/#row-details

What is the motivation / use case for changing the behavior? row detail becomes very useless if the expand all functionality does not work correctly

Please tell us about your environment: This isn't working on the current example given in this github.

Hembi commented 3 years ago

I also copy paste the http://swimlane.github.io/ngx-datatable/#row-details example to my project, and on initial height of the table is 53px and only shows one row. The expand and the scrollbar works. If I change the height of the "datatable-body" class only two row showed. The others are in the next page, or have to scroll, but overflow is hidden. The ng-reflect-page-size="2" is automatically set to 2.

Add style and limit attributes fixed the problem, but still not calculate the height automatically.

<ngx-datatable style="height: 500px;"
          #myTable
          class="material expandable"
          [columnMode]="ColumnMode.force"
          [headerHeight]="50"
          [footerHeight]="50"
          [rowHeight]="50"
          [scrollbarV]="true"
          [rows]="rows"
          [limit]="20"
          (page)="onPage($event)"
        >

Package version: @swimlane/ngx-datatable": "^19.0.0" Angular 9