This fixes an issue when any of Select2's special options are called on
multiple elements, it would only affect the first option in the group.
This was because Select2 was only applying any changes to the first
element in the group (as chosen by jQuery) instead of applying changes
on each and every element within the list.
This has the new side effect of special options like `select2('data')`
returning the results for the last element in the list instead of the
first element. Because the previous functionality was considered
unspecified behaviour, this is not being treated as a breaking change.
This closes https://github.com/select2/select2/issues/3413
This closes https://github.com/select2/select2/pull/3495
This will now pass all of the AJAX parameters into the AJAX request as
query string parameters, so now the page number (and other variables)
will be set automatically. This can still be overridden in `ajax.data`
to pass anything else, but this should make it easier for the most
common case.
This closes https://github.com/select2/select2/issues/3548
This closes https://github.com/select2/select2/pull/3552
This fixes an issue where the old `option` and `load-more` classes were
not switched over to the newer BEM style of class names. Unfortunately
this is a breaking change, but this is also a bug given that it doesn't
follow the proper prefixing and is likely to conflict with larger
applications.
https://github.com/select2/select2/issues/3889
Previously `this` would point to the AjaxAdapter that was being used to
process the AJAX, or sometimes the JS object holding the AJAX options,
instead of the jQuery element that Select2 was attached to. This fixes
the issue so `this` will consistently point to the jQuery element, just
like in past versions of Select2.
This closes https://github.com/select2/select2/issues/3361
This closes https://github.com/select2/select2/pull/3410
About `errorLoading`:
Before the correction, the translation was: "התוצאות לא נטענו בהלכה".
The word "בהלכה" is wrong and should be spelled "כהלכה", but besides that, this translations means "The results were loaded improperly", while my corrected translation means "Error while loading results", which is what needed.
About `inputTooLong`, `inputTooShort`, `maximumSelected`:
In Hebrew, it's not acceptable to have the digit 1 for representing a single object. You should use the actual word "one", which is "אחד" in Hebrew together with the singular noun (e.g. "one item" / "one character", instead of "1 item" / "1 character").
**These 3 parts needed a critical fix anyway**, because they were addind the English letter 's' to the end of the Hebrew string.
About `loadingMore`:
The translation was "טען תוצאות נוספות" which means "Load more results", as an instruction, probably a typo.
I changed "טען" to "טוען" so now it means "loading more results", which is the correct form.
This closes https://github.com/select2/select2/pull/3911
Previously we were only disabling the `input` handler when it was
triggered, which caused a race condition within the `keyup` handlers
which also was triggered by the `input` event. This fixes the issue by
also unbinding the `input` handlers within the `keyup` handler, to avoid
running into the race condition.
Thanks to @Eckankar for pointing out the race condition that still
existed in
66ae2ad1d5
This closes https://github.com/select2/select2/issues/3300
This adds two notes, one pointing to the old documentation and the other
pointing to the community, for getting extra help if their question is
not answered.
This adds more questions that will eventually get answers. Most of these
questions are already answered either in the current documentation or on
Stack Overflow, so it shouldn't be too difficult to fill out answers for
them.
Right now this sets up the new FAQ/Options page with most of the
questions for the how to control the selection. Not all of these
questions have answers, most of them weren't moved over, but there are
plans to add detailed answers to all of them.
The questions were aggregated based on common Stack Overflow and IRC
questions, as well as commonly asked things on GitHub.