Skip to content

Updated readme custom view example #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ Sync allows you to hook into and override or extend all of the actions it perfor

partial name 'list_row', resource name 'todo', order of lookup:

1. Sync.TodoListRow
2. Sync.ListRow
3. Sync.View (Default fallback)
1. RenderSync.TodoListRow
2. RenderSync.ListRow
3. RenderSync.View (Default fallback)


For example, if you wanted to fade in/out a row in a sync'd todo list instead of the Sync.View default of instant insert/remove:
For example, if you wanted to fade in/out a row in a sync'd todo list instead of the RenderSync.View default of instant insert/remove:

```coffeescript
class Sync.TodoListRow extends Sync.View
class RenderSync.TodoListRow extends RenderSync.View

beforeInsert: ($el) ->
$el.hide()
Expand All @@ -315,7 +315,6 @@ class Sync.TodoListRow extends Sync.View
afterInsert: -> @$el.fadeIn 'slow'

beforeRemove: -> @$el.fadeOut 'slow', => @remove()

```

## Narrowing sync_new scope
Expand Down