Skip to content

Commit

Permalink
Revert "Removing the double event binding registration of "selection:…
Browse files Browse the repository at this point in the history
…update" within SingleSelection.prototype to prevent multiple calls on the selection event (select2#4306)"

This reverts commit 2042920.
  • Loading branch information
faraquet committed Nov 27, 2019
1 parent d2f3937 commit 0ff6a90
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Expand Up @@ -114,8 +114,6 @@
- User-defined types not normalized properly when passed in as data (#4632)
- Perform deep merge for `Defaults.set()` (#4364)
- Fix "the results could not be loaded" displaying during AJAX request (#4356)
- Cache objects in `Utils.__cache` instead of using `$.data` (#4346, #5486)
- Removing the double event binding registration of `selection:update` (#4306)

#### Accessibility
- Improve `.select2-hidden-accessible` (#4908)
Expand Down
4 changes: 4 additions & 0 deletions src/js/select2/selection/single.js
Expand Up @@ -62,6 +62,10 @@ define([
self.$selection.trigger('focus');
}
});

container.on('selection:update', function (params) {
self.update(params.data);
});
};

SingleSelection.prototype.clear = function () {
Expand Down

0 comments on commit 0ff6a90

Please sign in to comment.