Skip to content
Snippets Groups Projects
Commit ab4be820 authored by Anton Guz's avatar Anton Guz
Browse files

MAGETWO-35043: Tabs widget does not initialize sometimes on Product Creation page

 - Delay until DOMContentLoaded for initializing options in Suggest Widget.
parent c0eef7ca
Branches
No related merge requests found
...@@ -811,15 +811,19 @@ ...@@ -811,15 +811,19 @@
* @private * @private
*/ */
_renderMultiselect: function () { _renderMultiselect: function () {
var that = this;
this.element.wrap(this.options.multiSuggestWrapper); this.element.wrap(this.options.multiSuggestWrapper);
this.elementWrapper = this.element.closest('[data-role="parent-choice-element"]'); this.elementWrapper = this.element.closest('[data-role="parent-choice-element"]');
this._getOptions().each($.proxy(function (i, option) { $(function () {
option = $(option); that._getOptions()
this._createOption({ .each(function (i, option) {
id: option.val(), option = $(option);
label: option.text() that._createOption({
}); id: option.val(),
}, this)); label: option.text()
});
});
});
}, },
/** /**
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment