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

Variable unknown height size #5

Open
Textras opened this issue Jul 26, 2017 · 1 comment
Open

Variable unknown height size #5

Textras opened this issue Jul 26, 2017 · 1 comment

Comments

@Textras
Copy link

Textras commented Jul 26, 2017

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 rintoj/ngx-virtual-scroller#12
and a post on the Recycler View with much the same problem spelled out in more detail.

hilongjw/vue-recyclerview#13

@hejianxian
Copy link
Owner

@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.

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