/ember-buffered-proxy-component

An Ember Component that uses BufferedProxy to enable change buffering at the view level

Primary LanguageJavaScriptMIT LicenseMIT

Ember BufferedProxy Component Build Status Ember Observer Score

An Ember Component that uses BufferedProxy to enable change buffering at the view level.

Usage

{{model.name}}

{{#buffered-proxy content=model as |content apply discard hasChanges|}}
  {{content.name}} (Has changes: {{hasChanges}})
  
  {{input value=content.name}}

  <button {{action apply}}>Apply</button>
  <button {{action discard}}>Discard</button>
{{/buffered-proxy}}

Using {{buffered-proxy}}s block param, content.name gets disconnected from model.name, once it's changed and the changes hasn't been applied back to the outer context. Firing a discard action resets the proxy value. Check out the tests for more info.

Development

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server

Building

  • ember build

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