Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(): PR #201 breaks server-side paging #210

Closed
otodockal opened this issue Oct 17, 2016 · 2 comments
Closed

bug(): PR #201 breaks server-side paging #210

otodockal opened this issue Oct 17, 2016 · 2 comments

Comments

@otodockal
Copy link
Contributor

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

Current behavior

The problem is only with server-side paging, probably. The bug was introduced by PR #201

Method RowHeightCache.initCache iterate over the collection rows using of for loop, but it doesn't get proper index when paginator is not used in row (e.g. click on page 3 at first). A solution can be using of for...in loop, but it's not also the proper solution for everything...

TypeError: Cannot read property '$$expanded' of undefined

Expected behavior

Reproduction of the problem

click on page > 2

https://plnkr.co/edit/I4Z2FibupHPGYVUXQGYh?p=preview

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

Please tell us about your environment:

  • Table version: 0.7.x

  • Angular version: 2.0.x

  • 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 ]

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

@amcdnl
Copy link
Contributor

amcdnl commented Oct 17, 2016

Fixed. @java2kus can u verify this is a good change?

@amcdnl amcdnl closed this as completed Oct 17, 2016
@java2kus
Copy link
Contributor

@amcdnl Will submit a pull request to fix the above. For the time being the above fix will work but rowHeightsCache should only be applicable to virtual scrolling only. We need to put a guard around the refreshRowHeightCache method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants