vue-list icon indicating copy to clipboard operation
vue-list copied to clipboard

Variable unknown height size

Open Textras opened this issue 7 years ago • 1 comments

Hi, this is how we implemented our scroll, but I am curious if you have any outside the box thoughts on executing a social feed where the components are going to come back with variable heights. Hard to pre-determine with out taking a substantial performance hit. Just curious if you have any insight or ideas for a work around to...

"First of all, there is a prerequisite, that is , the height of each item list to be consistent , which is mainly to facilitate the calculation."

Heres an Angular scroll speaking to the same issue https://github.com/rintoj/angular2-virtual-scroll/issues/12 and a post on the Recycler View with much the same problem spelled out in more detail.

https://github.com/hilongjw/vue-recyclerview/issues/13

Textras avatar Jul 26 '17 15:07 Textras

@Textras

Hello, I've thought of this kind of question before, if we want to adapt the variable height, maybe we can mark some attribute in each item, for example we add a 'type' attribute and configure the height of 'type', or just set the height in each item directly.

However the keypoint is how we calculate the height of the list outside the view, we need to figure out which item is, and adding the height together, and change into the padding-top attribute in the list.

Of course it should have a max value of the item height.

hejianxian avatar Jul 27 '17 08:07 hejianxian