Module: alfresco/services/InfiniteScrollService

alfresco/services/InfiniteScrollService

This service should be included on a page whenever you want to configure an AlfSortablePaginatedList to be configured to use infinite scrolling for handling pagination.
Author:
  • david.webster@alfresco.com
License:
Source:

Members

_registerScrollListenerImmediately :boolean

By default, the publishScrollEvents function will be called in the constructor. If overridden and set to false then it will not, and should instead be called manually later on.
Type:
  • boolean
Default Value:
  • true
Source:

dataloadInProgress :boolean

Used to keep track of the current status of the InfiniteScroll
Type:
  • boolean
Default Value:
  • false
Source:

scrollTolerance :int

Scroll tolerance in pixels. How close to the bottom of the page do we want to get before we request the next items?
Type:
  • int
Default Value:
  • 500
Source:

Methods

nearBottom(scrollNode) → {boolean}

Determine if we're at or close to the bottom of the monitored node as defined by the scrollTolerance variable.
Parameters:
Name Type Description
scrollNode Object The node being scrolled
Source:
Returns:
Type
boolean

onEventsScroll(payload)

When the scroll event triggers, check location and pass on the warning that we're near the bottom of the page sets dataloadInProgress to prevent duplicated triggers when the page is scrolled slowly.
Parameters:
Name Type Description
payload object
Source:

onScrollReturn(payload)

Called when infinite scroll request has been processed and allows us to trigger further scroll events
Parameters:
Name Type Description
payload object
Source:

registerSubscriptions()

Since:
  • 1.0.32
Source:
Listens to Events: