Skip to content
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

[FEATURE] Two-way sync between rows and model #167

Merged
merged 10 commits into from
Sep 13, 2016
Merged

Conversation

offirgolan
Copy link
Collaborator

This PR allows the user to have a two-way sync between the table's row content and their passed in model instance without modifying the existing API.

Usage:

new Table(this.get('columns'), this.get('model'), { enableSync: true });

If you want enableSync to be enabled by default, add the following to your config/environment.js file

module.exports = function(environment) {
  var ENV = {
   // ...
    'ember-light-table': {
      enableSync: true
    }
  };

  // ...

  return ENV;
};

@taras
Copy link
Collaborator

taras commented Sep 12, 2016

LGTM 👍

@offirgolan offirgolan merged commit 0ec6c36 into master Sep 13, 2016
@offirgolan offirgolan deleted the observable-models branch September 13, 2016 21:31
@sivakumar-kailasam
Copy link
Contributor

@offirgolan Can we get a release for this? Much awaited feature 😄

@offirgolan
Copy link
Collaborator Author

@sivakumar-kailasam waiting for #177! Once that's merged, I'll make a new minor release.

offirgolan added a commit that referenced this pull request Sep 25, 2016
* master: (28 commits)
  Use ember-cli-code-coverage for code coverage (#185)
  Removed ember-cli-blanket (#176)
  chore(package): update ember-get-config to version 0.1.8 (#184)
  Add scaffolding comment
  Released v1.4.0
  Add footer scaffolding and move width into style attr (#183)
  chore(package): update ember-cli-jshint to version 2.0.1 (#170)
  chore(package): update ember-code-snippet to version 1.6.0 (#174)
  chore(package): update ember-cli-mirage to version 0.2.2 (#180)
  Customizable components (#177)
  Revert "Move scaffolding width to style attribute"
  Move scaffolding width to style attribute
  Update component usage docs
  Demo and Docs modifications (#171)
  Fix docs typo
  [FEATURE] Two-way sync between rows and model (#167)
  Update ember-cli to version 2.8.0 🚀 (#165)
  chore(package): update ember-cli-qunit to version 3.0.1 (#168)
  Released v1.3.1
  [FEATURE] Introduce `resizeOnDrag` for column resizing (#166)
  ...

# Conflicts:
#	addon/classes/Table.js
#	addon/components/cells/base.js
#	addon/components/columns/base.js
#	addon/templates/components/lt-head.hbs
@JensNordenbro
Copy link

JensNordenbro commented Mar 2, 2017

@offirgolan - Is this part of 1.8.3 release?
I have bound to Ember data with a cell component with in my hbs as follows:
{{input type=text value=value}}
expecting two-way-binding. When changing values in the model in Chrome-debugger->Ember mode the ui gets updated but the opposite is not true.
My table is defined according to:
table: computed('model', function() {
return new Table(this.get('columns'), this.get('model'),{ enableSync: true });
}),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants