I am facing a situation where I have an API that returns multiple div elements. In my user interface, there is a parent div in which these child divs need to be displayed. The challenge is that if the child divs are overflowing the parent div, they should be shown on the next page.
For example, let's assume the API returns a string like this:
<div class="ab0"></div>
<div class="ab1"></div>
<div class="ab2"></div>
<div class="ab3"></div>
<div class="ab4"></div>
If the parent div can only accommodate ab0, ab1, and ab2, then I want to display these 3 divs first. When the user clicks on the '>' symbol, I intend to show ab3 and ab4. Additionally, if ab2 is partially overflowing and I can display only the overflow part on the next page, it would be ideal.
Is there a way to achieve this?
Thank you in advance.