Open mailok opened 6 years ago
I'm experiencing this too.
Here too
I've experienced this too. A workaround is to force the table to be rebuilt each time you need to display it by putting the table inside an ngIf
I had the same problem. So applied my own solution and it worked. On the table scroll event record the last Hscroll position than when you switch back set the scroll again.
ngxTable.element.getElementsByTagName('datatable-body')[0].scrollTop = lastScrollTop;
I am having this problem as well. No luck with setting the scrollTop value.
I am not using tabs as in the example above - I have the ngx-datatable inside another component which can be resized. If I scroll the table, then resize it, it has no visible rows. Is there some way to prompt the table to redraw itself, or re-check which rows are visible?
I'm seeing this as well
mine doesn't happen with scrolling - simply clicking between the two tabs I have - each having its own ngx table - The rows disappear for the other tab (when going back to it) - but if I adjust the window size the rows (on the other tab) are visible again (when I go back to it)... No fixes after 4 years? the only "hack" that worked for me was to use an ngIf as suggested above on each div container for each table... I change this from true to false and back to true when either the window is resized OR when the tab is clicked... This seems to clear up most of the issue for me (but I still dont like it 😣)
I'm submitting a ... (check one with "x")
Current behavior I have two tables, in two tabs, when one of the tables is hidden and the scroll is not at the beginning, when the table is shown again the rows disappear, until the scroll moves.
Expected behavior
I expected him to show me the table with his rows Reproduction of the problem
What is the motivation / use case for changing the behavior?
Please tell us about your environment:
Table version: 0.8.x "@swimlane/ngx-datatable": "12.0.0",
Angular version: 2.0.x angular/animations: "6.0.2", angular/cdk: "6.0.2", angular/common: "6.0.1", angular/compiler: "6.0.1", angular/core: "6.0.1", angular/forms: "6.0.1", angular/http: "6.0.1", angular/material: "6.0.2", angular/platform-browser: "6.0.1", angular/platform-browser-dynamic: "6.0.1", angular/router: "6.0.1", "core-js": "2.5.6", "hammerjs": "2.0.8", "material-design-icons": "3.0.1", "rxjs": "6.1.0", "rxjs-compat": "6.1.0", "validator": "10.1.0", "zone.js": "0.8.26"
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 ] Google Chrome Version 66.0.3359.181 (Official Build) (64-bit)
Language: [all | TypeScript X.X | ES6/7 | ES5] "typescript": "2.7.2"