question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

need auto row height, vertical scroll, virtualization not required

See original GitHub issue

I’m submitting a … (check one with “x”)

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

Current behavior

Scenario 1: auto row heights, text wrapping within cells, but absolutely no scrolling vertically Scenario 2: fixed row heights, scrolling vertically (with or without virtualization) Expected behavior

d

I just need to have auto row heights with text wrapping, and able to scroll to the rows beyond whats visible in the screen. What am I missing here XD. I don’t need scroll virtualization as I’m going to reduce the rows per page server side to a smaller amount…

Reproduction of the problem

set row height to auto. set scrollBarV to true. set virtualization to false. poof error saying cannot use auto row height with scrollBarV true.

What is the motivation / use case for changing the behavior?

some datatables have lots of columns, and some of those columns have very long values that need text wrapping to see all of the data instead of cutting it off. and these tables have more rows than fits on the visible screen, so we need to scroll down. Please tell us about your environment:

Windows 8, 10, atom, npm, iis, angular 5 ui, c# webapi

  • Table version: 0.8.x

Yes, check

  • Angular version: 2.0.x

5.x.x check

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

ALL

  • Language: [all | TypeScript X.X | ES6/7 | ES5] all

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

3reactions
bleuscythercommented, Aug 31, 2018

@collindutter in the .scss file of the component displaying the table :

.ngx-datatable{
  overflow-y: visible;
}

It does not work with any configuration here is what i have i don’ t remember exactly when it stopped working, but i think if you use some configurations the table content will not show:

 <ngx-datatable
            #trTable
            class="expandable"
            [rows]="rows"
            [scrollbarH]="true"
            [columns]="columns_default"
            [columnMode]="'force'"
            [headerHeight]="50"
            [footerHeight]="50"
            [rowHeight]="'auto'"
            [limit]="10">

                 <ngx-datatable-footer>
                     ...
                </ngx-datatable-footer>

                 <!-- Row Detail Template -->
                <ngx-datatable-row-detail [rowHeight]="'auto'" #myDetailRow (toggle)="onDetailToggle($event)">
                     <ng-template let-row="row" let-expanded="expanded" ngx-datatable-row-detail-template>
                        ...
                    </ng-template>
                </ngx-datatable-row-detail>
</ngx-datatable>

I hopr this helps

2reactions
mail2venkatcommented, Sep 26, 2018

Seems some of the styles are missing, Try This

HTML

<ngx-datatable class=“material” [columnMode]=“‘flex’” [headerHeight]=“50” [footerHeight]=“50” [scrollbarV]=“true” [rows]=“rows”> <ngx-datatable-column name=“Name” [flexGrow]=“1”> <ng-template let-value="value" ngx-datatable-cell-template> {{value}} </ng-template> </ngx-datatable-column> <ngx-datatable-column name=“Gender” [flexGrow]=“1”> <ng-template let-row="row" let-value="value" ngx-datatable-cell-template> {{value}} </ng-template> </ngx-datatable-column> <ngx-datatable-column name=“company” [flexGrow]=“1”> <ng-template let-value="value" ngx-datatable-cell-template> {{value}} </ng-template> </ngx-datatable-column> </ngx-datatable>

CSS

.ngx-datatable.scroll-vertical .datatable-body { overflow-y: auto; } .ngx-datatable.scroll-vertical { height: 70vh; }

Read more comments on GitHub >

github_iconTop Results From Across the Web

ngx datatable vertical scroll with rowheight set to auto
I am using ngx-datatable inside my Angular application. I was wondering if it is possible to use vertical scrolling ...
Read more >
Problem with vertical scrollbar when height of rows is different.
In this case I have a bug with a vertical scrollbar: it's changes the height of the vertical thumb during scroll. I tried...
Read more >
Virtual Scrolling - Grid - Kendo UI for Angular - Telerik
The virtual scrolling functionality requires that all Grid rows have an equal, predefined height. However, you can still keep virtual scrolling and use ......
Read more >
Rendering large lists with React Virtualized - LogRocket Blog
First, the List component requires you to specify the width and height of the list. It also needs the height of the rows...
Read more >
How to create a virtualized grid with dynamic height support ...
Obviously the height of the tables will be the same, so scroll will ... When data changes for any row, recalculation may be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found