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

CellMeasurer for List with equal dynamic height rows #1099

Closed
zhulduz opened this issue May 5, 2018 · 4 comments
Closed

CellMeasurer for List with equal dynamic height rows #1099

zhulduz opened this issue May 5, 2018 · 4 comments

Comments

@zhulduz
Copy link

zhulduz commented May 5, 2018

I apologize in advance if the question already exists, but I have not found.

I use CellMeasurer for List with dynamic heights, and all rows have the identical heights.
CellMeasure calculates the height for each row, what is unnecessary for my case.

Is there any possible solution to make CellMeasurer calculate only one time to speed up performance?
Or maybe is there another solution for my case?

Thanks in advance.

@wuweiweiwu
Copy link
Contributor

perhaps setting fixedHeight parameter to true?

Or its possible to pre-render a row use ReactDOM.findDOMNode to find the height of and then set it in List props

Hope that helps.

@alecmerdler
Copy link

Found this: #794

Use CellMeasurerCache with keyMapper:() => 1.

@wuweiweiwu
Copy link
Contributor

thats awesome! thanks for finding that @alecmerdler

@zhulduz
Copy link
Author

zhulduz commented Aug 27, 2018

Sorry for later response. @alecmerdler thanks, it works now.

@github-actions github-actions bot added the Stale label Oct 10, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2024
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