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
tbody
so
we can target it for appending.
page
and
value of the next page to load
ic-append-from
,
ic-target
, and
ic-trigger-on
attributes to trigger appending to the table body, and that includes the hidden input using the
ic-include
tag 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