Cache objects in Utils.__cache
instead of using $.data
(#4346)
This commit is contained in:
parent
62c4f6332b
commit
1864a3d538
@ -13,6 +13,7 @@
|
||||
- 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)
|
||||
- Removing the double event binding registration of `selection:update` (#4306)
|
||||
|
||||
#### Accessibility
|
||||
|
4
src/js/select2/utils.js
vendored
4
src/js/select2/utils.js
vendored
@ -272,10 +272,9 @@ define([
|
||||
$element.append($nodes);
|
||||
};
|
||||
|
||||
// Cache objects in Utils.__cache instead of $.data
|
||||
// Cache objects in Utils.__cache instead of $.data (see #4346)
|
||||
Utils.__cache = {};
|
||||
|
||||
|
||||
var id = 0;
|
||||
Utils.GetUniqueElementId = function (element) {
|
||||
// Get a unique element Id. If element has no id,
|
||||
@ -308,7 +307,6 @@ define([
|
||||
Utils.__cache[id][name] = value;
|
||||
};
|
||||
|
||||
|
||||
Utils.GetData = function (element, name) {
|
||||
// Retrieves a value from the cache by its key (name)
|
||||
// name is optional. If no name specified, return
|
||||
|
Loading…
Reference in New Issue
Block a user