-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
add get size helpers #1022
add get size helpers #1022
Conversation
@nihgwu correct me if I'm wrong. But can't you just calculate those values using the required props that you passed into columnCount
columnWidth
rowCount
rowWidth |
@wuweiweiwu |
@TrySound Any opinion on this? |
@nihgwu I see. Thanks for clarifying :) |
I think it's good. Let's wait until #1009 will be landed in master. |
@TrySound Thanks, I'm accessing the private instance right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the code is updated to match how we current store the sizeAndPositonManager
I can merge this!
source/Grid/Grid.js
Outdated
* Gets estimated total rows' height. | ||
*/ | ||
getTotalRowsHeight() { | ||
return this._rowSizeAndPositionManager.getTotalSize(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rowSizeAndPositionManager
is now stored in this.state.instanceProps
.
@wuweiweiwu updated |
Awesome! I'll make sure tests pass tonight and I'll merge this! Thanks @nihgwu |
Tests all pass locally, merging. |
I'm creating a
Table
based onGrid
, it supports tree data and auto growable height, I need to get the total rows' height after expanding/adding/removing or I have to calculate every time it changes manually, right now I have to access the private_rowSizeAndPositionManager
to get the total height