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

Call $render method of NgModelController to reflect the original value #1073

Closed
wants to merge 1 commit into from

Conversation

yoichiro
Copy link

In the default implementation of the ng-input directive, sometimes the original value is NOT displayed, when the "ESC key" is pressed. I guess that this cause is the following processes:

(1) NgModelController.$setViewValue() called. -> The scope.row.entity.* value is changed.
(2) element.blur() called.
(3) $rootScope.$digest() called. -> The scope.row.entity.
* value is re-written by the new value.

To commit the 1st value change, NgModelController.$render() method should be called after calling the $setViewValue() method.

@c0bra
Copy link
Contributor

c0bra commented Apr 22, 2014

I'm not sure I follow the problem. Assuming you mean that when you change the value of an editable cell, but press the ESC instead of blurring the input, it doesn't then change the rendered value back to what it was before: I've bever seen that behavior.

If you can provide a plunker and steps to reproduce, that would be great. And you could also check against the 3.0 branch as a lot of the editable cell functionality was brought over.

Also, this may not be relevant with newer versions of angular. I know a decent amount of ngModel's stuff has changed in the 1.2.x releases.

@c0bra c0bra closed this Apr 22, 2014
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.

None yet

2 participants