Selection tag to show items in repeater, with dynamic loading code, how to limit to show only selection tag posts?

Hello!

I have done up a blog post site to show my articles.
My current set up is such that if I have selection tags for users to select the type of articles they would like to read. My repeater would then automatically retrieve data from the connection set it is linked up to.

As I only limit users to see the first 21 posts, I added in a dynamic loading following the tutorial by Code Queen [(https://www.totallycodable.]((https://www.totallycodable.) com/post/auto-load-content-on-scroll-to-create-a-lazy-loading-effect).

The issue I now face is when the selected selection tag has less than 21 articles, with the dynamic loading, it would always trigger to load all the other non-related posts for me.

What can I do to solve this?

Please post your code.