You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: should limit the selection to 5.
Actual behavior: no limit.
Investigation: The dataAdapter prototypes get decorated with methods when maximumSelectionLength first, and with tokenSeperators later. Unfortunately, they both have same method name "query", and one will override the other in dataAdapter respectively.
Browsers: Google Chrome
Operating System: Windows/Mac OS
Some of the following fields will override maximumSelectionLength:
query
tokenSeperators
closeOnSelect (set it to false with cause maximumSelectionLength) not working.
Steps to re-produce:
Example:
$("select").select2({ data: ["a","b", "c", "d", "e"], multiple: true, maximumSelectionLength: 3, tokenSeparators: [",", ' '], //closeOnSelect: false, width: '100%' })
Expected behavior: should limit the selection to 5.
Actual behavior: no limit.
Investigation: The dataAdapter prototypes get decorated with methods when maximumSelectionLength first, and with tokenSeperators later. Unfortunately, they both have same method name "query", and one will override the other in dataAdapter respectively.
Browsers: Google Chrome
Operating System: Windows/Mac OS
Some of the following fields will override maximumSelectionLength:
Libraries
Demo: https://jsfiddle.net/dpnminh/76shLmt2/
The text was updated successfully, but these errors were encountered: