new tart.ui.InfiniteScrollComponentModel()
Model for the load more component. Manages loading states to prevent performance problems like double actions.
Extends
Members
-
EventTypestring
-
Event types for this model.
Properties:
Name Type Default Description SHOULD_LOAD
string load -
Statestring
-
Load more states.
Properties:
Name Type Default Description DEFAULT
string default SHOULD_CHECK
string shouldCheck LOADING
string loading
Methods
-
Dispatches a load event to inform the parent component that it's at the end of a scroll and should load more items.
-
Resets the component state to default state.
-
shouldCheck(){boolean}
-
Informs the caller if this model is in an appropriate state for checking the right (scroll) position.
Returns:
Type Description boolean Whether the component should check for the right (scroll) position. -
triggerShouldCheckState()
-
If the component is not in LOADING state, it should check to see if it should load. This method will be triggered on every scroll event.