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

A dynamic change in the height of scrolled items results in many items not displayed #181

Open
szalapski opened this issue Nov 30, 2017 · 3 comments

Comments

@szalapski
Copy link

szalapski commented Nov 30, 2017

See example here: https://codepen.io/szalapski/pen/RjErZV

Steps to reproduce:

  1. Load the example at https://codepen.io/szalapski/pen/RjErZV . Notice the bottom section scrolls well, showing all 1000 items.
  2. Scroll back to the top of the rendered page and uncheck "Tall version". This makes every item about half as tall.

Then scroll down more than halfway and notice that (1) not all 1000 items can be seen, and (2) the scroll region is not filled with items in every case.

Any chance you would know how to fix?

@szalapski szalapski changed the title A dynamic change in the height of scrolled items needs tweaks to display correctly. A dynamic change in the height of scrolled items results in many items not displayed Nov 30, 2017
@szalapski
Copy link
Author

I tried calling $rootScope.$broadcast('vsRepeatTrigger'); when I changed the size of the elements--as a workaround--but it had no effect; I still see the same symptom.

@tstpierre
Copy link

Seeing the same thing, broadcasting vsRepeatTrigger doesn't appear to do anything.

I have a row that is either 80 or 130 pixels fixed based on if a certain mode is turned on. broadcasting vsRepeatTrigger after that switch toggles the boolean under the hood still throws size warnings despite size being set to the view model binding expression.

@tstpierre
Copy link

I was able to resolve this by messaging the toggle via rootScope (its elsewhere in the component composition) and then in the specific component that was home to vs-repeat in the template:

  • changed row size
  • used scope to broadcast vsRepeatTrigger
  • used scope to broadcast vsRepeatResize

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