This tutorial will show you how to implement "Click To Load" behavior with only a few lines of IntercoolerJS. It builds on the previous Infinite Scroll tutorial.
Here are the steps for implementing inifinite scroll
tbodyso we can target it for appending.
pageand value of the next page to load
ic-trigger-onattributes to trigger appending to the table body, and that includes the hidden input using the
ic-includetag to include the last hidden input in the table.
Here is a diff between infinite scroll and click-to-load:https://github.com/LeadDyno/intercooler-tutorial-app/commit/11322f35cda1a7c9fa480f845b43cb28e162f64a