0

I am working on a Ionic 7 application with Angular 16. In this version of Ionic, ion-virtual-scroll was deprecated and they recommend to use the @angular/cdk ScrollingModule. Ionic Virtual Scroll Migration

The problem is the following: I have the cdk-virtual-scroll-viewport inside a cupertino pane (See Cupertino Pane NPM docs) with 3 breakpoints.

In the lower breakpoint, the virtual scroll works well, but in the other break points the container is not adapting to the pane height. (the virtual scroll background is red for this demo).

bottom breakpoint

enter image description here

middle breakpoint

enter image description here

top breakpoint

enter image description here

As you can see, in the middle and top breakpoint of the pane, the virtual scroll is still rendering like the initial one, this is because the rendering viewport is not adapting to the height of the pane.

This is how the console shows the virtual scroll:

enter image description here

How can I do to make the cdk-virtual-scroll-viewport render the virtual scroll as the panel height?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sergio Mendez
  • 1,311
  • 8
  • 33
  • 56

0 Answers0