diff --git a/README.md b/README.md index 4ecebb6e..7941adf8 100755 --- a/README.md +++ b/README.md @@ -77,6 +77,37 @@ Once the collection has been rendered, `estimated-width` and `estimated-height` You must specify the `height`, `width` and `cell-layout` parameters because *EmberCollection* will try to fill visible area with items. +### Actions + +#### scroll-change + +If you do not provide a `scroll-change` action name or closure action, scrolling will work normally. + +If you *do* specify `scroll-change`, ember-collection assumes that you want to handle the scroll-change action in a true data down, actions up manner. For this reason, ember-collection will not set `scroll-left` and `scroll-right` itself, but rather rely on you to update those properties based on action handling as you see fit. + +An example of specifying an action and keeping scrolling working normally looks like this: + +```hbs +{{#ember-collection items=model cell-layout=(fixed-grid-layout itemWidth itemHeight) + scroll-left=scrollLeft scroll-top=scrollTop scroll-change=(action "scrollChange") + as |item index| }} +