@@ -11,9 +11,10 @@ require([
11
11
"jquery",
12
12
'Magento_Ui/js/modal/alert',
13
13
'Magento_Ui/js/modal/prompt',
14
+ 'uiRegistry',
14
15
"collapsable",
15
16
"prototype"
16
- ], function(jQuery, alert, prompt){
17
+ ], function(jQuery, alert, prompt, registry ){
17
18
18
19
function toggleApplyVisibility(select) {
19
20
if ($(select).value == 1) {
@@ -39,15 +40,20 @@ function getFrontTab() {
39
40
40
41
function checkOptionsPanelVisibility(){
41
42
if($('manage-options-panel')){
42
- var panel = $('manage-options-panel').up('.fieldset'),
43
+ var panelId = 'manage-options-panel',
44
+ panel = $(panelId),
45
+ panelFieldSet = panel.up('.fieldset'),
43
46
activePanelClass = 'selected-type-options';
44
47
45
48
if($('frontend_input') && ($('frontend_input').value=='select' || $('frontend_input').value=='multiselect')){
46
- panel .show();
49
+ panelFieldSet .show();
47
50
jQuery(panel).addClass(activePanelClass);
51
+ registry.get(panelId, function () {
52
+ jQuery('#' + panelId).trigger('render');
53
+ });
48
54
}
49
55
else {
50
- panel .hide();
56
+ panelFieldSet .hide();
51
57
jQuery(panel).removeClass(activePanelClass);
52
58
}
53
59
}
0 commit comments