0.0.15 • Published 6 years ago

ember-cli-pull-to-refresh v0.0.15

Weekly downloads
53
License
MIT
Repository
github
Last release
6 years ago

Build Status npm version Code Climate Test Coverage

Ember-cli-pull-to-refresh

A simple pull-to-refresh component for wrapping Ember CLI components.

Usage

This component is meant to wrap the content being refreshed:

{{#pull-to-refresh
  refresh='refresh'
  threshold=50
  refreshing=refreshing
  scrollable='.some-selector'
  disableMouseEvents=false
}}
  {{! render your model here }}
{{/pull-to-refresh}}

When the user drags the pull-to-refresh component down past the threshold (default 50 pixels), then lets go, the component sends a refresh action and enters the refreshing state. Your route can handle this action, fetch data from the server, then set the controller's refreshing property to false to reset to the default state. While in the refreshing state, the .pull-to-refresh element has a .refreshing class you can use for styling. When the user is pulling, it has a .pulling class. That's pretty much it!

Provide a scrollable selector that indicates the scrolling area being observed, in order to enable normal scrolling behavior when not at the top.

Both mobile touch events and desktop-browser mouse events are supported by default. Mouse events may be disabled by setting the property disableMouseEvents to true.

Installation

  • git clone <repository-url> this repository
  • cd my-addon
  • npm install

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

0.0.15

6 years ago

0.0.14

8 years ago

0.0.13

8 years ago

0.0.12

8 years ago

0.0.11

8 years ago

0.0.10

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago