-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x-select: use change() to handle changes from DOM
Ember views automatically call `.change()` on DOM change events, so we can use that hook instead of adding a change handler in `didInsertElement` and tearing it down in `willDestroyElement`. This is now the only place we need to call `_updateValueSingle` or `_updateValueMultiple`. We don't need to do that when the content changes from upstream since (in Glimmer) the component will render the difference automatically. Calling those in an observer on `content.@each` was causing upstream writes to happen unnecessarily.
- Loading branch information
James A. Rosen
committed
Jun 28, 2015
1 parent
81211fa
commit 539a041
Showing
1 changed file
with
6 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters