diff --git a/lib/web/mage/backend/suggest.js b/lib/web/mage/backend/suggest.js index 70dd802284562e8d43d54be0e28b5d38f7e27ac2..dfb3ef72d8c4d8424c949ea44dfba20b3a8f01be 100644 --- a/lib/web/mage/backend/suggest.js +++ b/lib/web/mage/backend/suggest.js @@ -811,15 +811,19 @@ * @private */ _renderMultiselect: function () { + var that = this; this.element.wrap(this.options.multiSuggestWrapper); this.elementWrapper = this.element.closest('[data-role="parent-choice-element"]'); - this._getOptions().each($.proxy(function (i, option) { - option = $(option); - this._createOption({ - id: option.val(), - label: option.text() - }); - }, this)); + $(function () { + that._getOptions() + .each(function (i, option) { + option = $(option); + that._createOption({ + id: option.val(), + label: option.text() + }); + }); + }); }, /**