1
0
mirror of synced 2024-11-28 15:46:03 +03:00
select2/tests/utils
Kevin Brown 6645ffd4bd
Select2 now clears the internal ID when it is destroyed (#5587)
This fixes a bug where if you cloned a Select2, the internal ID used
for mapping elements (specifically the `<select>`) to the in-memory
data store would be cloned as well, causing issues when you tried to
initialize Select2 on the cloned element. This was because we did not
properly clear all of the internal data and all of the internal
attributes that Select2 uses when we destroyed it. The internal
`data-select2-id` attribute was not being cleared, and this was the
attribute being used for the internal mapping.

Now we properly clear the `data-select2-id` attribute from the element
when we call `RemoveData` on the element. This aligns with what we
were trying to do, since we previously cleared out the internal store
for that ID, and fixes the issue we were seeing when cloning.

Fixes #5247
2019-07-27 21:37:43 -04:00
..
data-tests.js Select2 now clears the internal ID when it is destroyed (#5587) 2019-07-27 21:37:43 -04:00
decorator-tests.js Added inline searching for multiple selects 2014-11-22 19:21:46 -05:00
escapeMarkup-tests.js Pass through non-strings in escapeMarkup 2015-02-06 19:45:10 -05:00