We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28da826 commit 79c0d91Copy full SHA for 79c0d91
src/selectize.js
@@ -770,6 +770,13 @@ Selectize.prototype.refreshOptions = function(triggerDropdown) {
770
* @param {object} data
771
*/
772
Selectize.prototype.addOption = function(value, data) {
773
+ if ($.isArray(value)) {
774
+ for (var i = 0, n = value.length; i < n; i++) {
775
+ this.addOption(value[i][this.settings.valueField], value[i]);
776
+ }
777
+ return;
778
779
+
780
if (this.options.hasOwnProperty(value)) return;
781
value = String(value);
782
this.userOptions[value] = true;
0 commit comments