API Docs for: 0.3.3.76a5a761
Show:

InfiniteScrollContainerComponent Class

A component that contains infinite scrolled content.

Methods

_updateInfiniteCount

(
  • addedLength
)
private
Increments a property after the infinite scroll is finished.

Parameters:

  • addedLength Number
    the incremental length of the model

_updateScrollProperties

(
  • addedLength
)
private
Calls _updateInfiniteCount and updateInfiniteAvailable.

Parameters:

  • addedLength Number
    the incremental length of the model

afterInfiniteQuery

(
  • newRecords
)

Record processing or anything else that needs to happen with the returned records.

Parameters:

  • newRecords Object

    the records returned in this cycle

beforeInfiniteQuery

(
  • params
)
Called immediately before the infinite query starts.

Parameters:

  • params Object
    the params that will be used in the query

didInsertElement

()

Gives the component access to the store and starts the infinite query.

infiniteQuery

(
  • modelName
  • params
)
Promise
The query that will be used.

Parameters:

  • modelName String
    the name of the model
  • params Object
    the params that will be used in the query

Returns:

Promise: the records

performInfinite

(
  • modelName
  • params
)
Promise
Does what's needed for the infinite scroll. - sets infiniteQuerying to true - if passed modelName, sets infiniteModelName - if passed params, sets infiniteQueryParams - calls beforeInfiniteQuery - calls infiniteQuery then: - calls afterInfiniteQuery - calls _updateInfiniteProperties - sets infiniteQuerying to false

Parameters:

  • modelName String
    the model to be queried
  • params Object
    params to use in the query

Returns:

Promise: the records

updateHasMoreContent

(
  • addedLength
)
Determines whether the infinite scroll should continue after it finishes.

Parameters:

  • addedLength Number
    the incremental length of the model

Properties

_cycleCount

Number private
The number of queries that have cycled.

Default: 0

_fullQueryParams

Unknown private
The default parameters.

Default: ['start', 'limit']

hasMoreContent

Boolean
True if there is more content on the server.

Default: true

infiniteContentPropertyName

String
The name of the property that the infiniteScroll records will be added to.

Default: 'model'

infiniteIncrementBy

String
The property that will increment infiniteIncrementProperty.

Default: 'limit'

infiniteIncrementProperty

String
The property that will be incremented after each cycle.

Default: 'start'

infiniteModelType

String
The model name that will be queried.

Default: ''

infiniteQuerying

Unknown
True if a request has been initiated but not resolved.

Default: false

infiniteQueryParams

Array
An array of params that are needed for the infinite query.

Default: []

infiniteScrollAvailable

Unknown
True if the query can be sent.

Default: true

limit

Number
The limit param.

Default: 12

scrollContainer

String

Will be passed into the scroll listener to be the observed element on scroll.

Default: '.infinite-scroll-container'

start

Number
The start param.

Default: 0

Events

performInfinite

Debounces _performInfinite