Ngx-infinite-scroll: [scrollWindow]="false" with CSS height: 100% not working

Created on 10 Aug 2018  路  7Comments  路  Source: orizens/ngx-infinite-scroll

If we set [scrollWindow]="false" with a CSS height of 100%, infinite-scroll does not trigger.

If we set an explicit CSS height value in px (or em, rem, etc.) with overflow: auto, then it works as expected.

Demo

https://stackblitz.com/edit/ngx-infinite-scroll-bbaf6n

All 7 comments

try setting height with px.

@orizens, I know using px will work but I need to set it in %.

then try using height: 100vh

100vh does not equal 100%. I want 100% of the parent container which is not necessary 100% of the viewport.

I am seeing it on window scroll as well when the html element is set to 100%.

For example: html { height: 100% }

The scroll event never fires.

@alexandremoore @ThomasPizzo
this should work:

.search-results {
  height: 100%;
  display: flex;
  flex-direction: column;
}

your css code dont resolve this issue @orizens

Was this page helpful?
0 / 5 - 0 ratings