Skip to content

Commit f563434

Browse files
committed
refreshItems(): add "silent" option.
This is meant for the case where refreshItems() is called programmatically and hence the change event is not needed, or even bound to a handler which rather would react to "external" user input.
1 parent 69bda4b commit f563434

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/selectize.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1544,7 +1544,7 @@ $.extend(Selectize.prototype, {
15441544
* "Selects" multiple items at once. Adds them to the list
15451545
* at the current caret position.
15461546
*
1547-
* @param {string} value
1547+
* @param {string} values
15481548
* @param {boolean} silent
15491549
*/
15501550
addItems: function(values, silent) {
@@ -1743,15 +1743,15 @@ $.extend(Selectize.prototype, {
17431743
/**
17441744
* Re-renders the selected item lists.
17451745
*/
1746-
refreshItems: function() {
1746+
refreshItems: function(silent) {
17471747
this.lastQuery = null;
17481748

17491749
if (this.isSetup) {
1750-
this.addItem(this.items);
1750+
this.addItem(this.items, silent);
17511751
}
17521752

17531753
this.refreshState();
1754-
this.updateOriginalInput();
1754+
this.updateOriginalInput({silent: silent});
17551755
},
17561756

17571757
/**

0 commit comments

Comments
 (0)