Class: P2RComponentModel

P2RComponentModel

new tart.ui.P2RComponentModel()

Model for the pull to refresh component. Manages refreshing states to prevent performance problems like double actions.

Extends

Members

EventTypestring

Event types for this model.

Properties:
Name Type Default Description
SHOULD_REFRESH string refresh

Statestring

Pull to refresh states.

Properties:
Name Type Default Description
DEFAULT string default
SHOULD_CHECK string shouldCheck
REFRESHING string refreshing

Methods

Dispatches a refresh event to inform the parent component that it's at the appropriate position for refresh.

Resets the component state to default state.

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 REFRESHING state, it should check to see if it should refresh. This method will be triggered on every scroll event.