956ac46dab
This adds backwards compatibility back into Select2 for `<input />` tags. The compatibility modules are only available in the full version and will trigger a warning if a hidden input is being used. With the new decorator, Select2 should support the basic operations that it previously did, with the exception of completely overriding the internal objects. As we no longer expose `data` as a writable method, it is no longer possible to completely override the selected data. The state is still managed internally, but in order to prevent data corruption issues in the past, it is not exposed to the public. Some small changes needed to be made to how Select2 was dynamically generating new `<option>` tags, so now a method is called that can be overridden. In the case of the new decorator, this method is intercepted and handled without having to actually place the `<option>` tags into the DOM. The decorator is applied after all of the other defaults, as the defaults are not given the current element. There has only been limited testing with this decorator, primarily using the `data` and `placeholder` options. This closes https://github.com/select2/select2/issues/3022. |
||
---|---|---|
.. | ||
i18n | ||
select2.amd.full.js | ||
select2.amd.js | ||
select2.full.js | ||
select2.full.min.js | ||
select2.js | ||
select2.min.js |