Skip to main content

Function: hasMorePages()

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / hasMorePages

Function: hasMorePages()

hasMorePages(currentOffset, limit, total): boolean

Defined in: packages/launchpad-sdk/dist/utils/pagination-helpers.d.ts:161

Check if there are more pages available

Determines if pagination should continue based on current offset/limit and total. Useful for implementing auto-pagination with safety checks.

Parameters​

currentOffset​

number

Current pagination offset

limit​

number

Items per page

total​

number

Total number of items

Returns​

boolean

True if more pages available, false if at or past the end

Example​

hasMorePages(0, 20, 100) // Returns: true (offset 0, total 100)
hasMorePages(80, 20, 100) // Returns: true (offset 80, only 20 left)
hasMorePages(100, 20, 100) // Returns: false (offset equals total)
hasMorePages(120, 20, 100) // Returns: false (offset past total)

Since​

6.5.0