umbraco / Umbraco.Cms.Integrations

MIT License
31 stars 20 forks source link

Add ActiveCampaign Form Picker pagination #182

Closed acoumb closed 3 months ago

acoumb commented 3 months ago

Current PR adds pagination to the ActiveCampaign Form Picker, following issue #180 .

By default, the number of results is limited to 20 (with a max of 100), therefor I have introduced a default size of 10 for the number of items displayed on a page, value that I then use as a query string parameter - limit - to toggle the number of results. Navigating the forms is managed through an additional query string parameter called offset, a zero-based index.

For example, the initial request will be /api/3/forms?limit=10, to get the first 10 items, then for other pages the path will be /api/3/forms?limit=10&offset=[(page - 1)*pageSize].

More details on pagination can be found here.

The update can be viewed in action in this demo.