ng2-vs-for icon indicating copy to clipboard operation
ng2-vs-for copied to clipboard

dynamic size for dynamic content

Open iBasit opened this issue 9 years ago • 3 comments

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 avatar May 05 '16 23:05 iBasit

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?

iBasit avatar May 06 '16 00:05 iBasit

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

kamilkp avatar May 06 '16 05:05 kamilkp

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.

iBasit avatar May 06 '16 16:05 iBasit