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

dynamic size for dynamic content #3

Open
iBasit opened this issue May 5, 2016 · 3 comments
Open

dynamic size for dynamic content #3

iBasit opened this issue May 5, 2016 · 3 comments

Comments

@iBasit
Copy link

iBasit commented May 5, 2016

I have text content for each row, which can be long text or short for each row.

I have read, we can set size:getItemSize as getItemSize method to change dynamic method for each row.

The only question I have in this, how we get different height size for text content? do we use jQuery,height() method or is there some other way for knowing what actual size is for the row? or is there auto size finder?

@iBasit
Copy link
Author

iBasit commented May 6, 2016

Thanks for creating this plugin, everything seems to be working fine now, I'm loven it!

The only thing is left, is the content with dynamic height, Just confused on how to pass different sizes for different content height, based on the content. (like some rows would have lots of text and some rows would have less text). so height is dynamic (less: 30px, 45px, 50px, 80px, 100px, 500px, 433px... ) it can be any sizes based on written text for each row.

any suggestion on this?

@kamilkp
Copy link
Owner

kamilkp commented May 6, 2016

If its just plain text any you depend on the renderer where it put linebrakes its gonna be extremely hard. Get getItemSize is meant for a scenario where you can calculate the height of an item up front. e.g. you know
that some rows have a header or whatever. The jQuery.height only works for an element that is already redndered in the DOM. You need to figure out how to calculate it before it gets rendered.

Kamil Pękala

Dnia 06.05.2016 o godz. 02:49 Basit [email protected] napisał(a):

Thanks for creating this plugin, everything seems to be working fine now, I'm loven it!

The only thing is left, is the content with dynamic height, Just confused on how to pass different sizes for different content height, based on the content. (like some rows would have lots of text and some rows would have less text). so height is dynamic (less: 30px, 45px, 50px, 80px, 100px, 500px, 433px... ) it can be any sizes based on written text for each row.

any suggestion on this?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@iBasit
Copy link
Author

iBasit commented May 6, 2016

Ya I was afraid of that as well too. Just was hoping you might know some solution of getting it done, since even this solution you implemented is out of the box solution.

Anyway, I will see if some magical way somethings pop-up lolz "aabra ka dabra"

Thanks for your support and thanks for this great plugin.

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

No branches or pull requests

2 participants