Skip to content
This repository was archived by the owner on Sep 2, 2020. It is now read-only.

Commit f1c7a7a

Browse files
Studio Performance[WM-17843]: Update properties panel for a widget only after it is selected in canvas
Change-Id: I44abe18e893bd5cb385f6dbebfb25b04df275059
1 parent f7dd1e3 commit f1c7a7a

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

  • src/main/webapp/scripts/modules/widgets/base

src/main/webapp/scripts/modules/widgets/base/Base.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3824,10 +3824,14 @@ WM.module('wm.widgets.base', [])
38243824
if (CONSTANTS.isRunMode) {
38253825
return;
38263826
}
3827-
var property = 'bind' + (attrs.listenProperty || 'dataset');
3828-
3829-
$is.$on('$destroy', $is.$watch(property, function () {
3830-
WidgetUtilService.updatePropertyPanelOptions($is);
3827+
var property = 'bind' + (attrs.listenProperty || 'dataset'),
3828+
isActive;
3829+
$is.$on('$destroy', $is.$watchGroup([property, 'active'], function (arr_Expr_Active) {
3830+
isActive = arr_Expr_Active[1];
3831+
// update property panel options only if the widget is selected in canvas.
3832+
if (isActive) {
3833+
WidgetUtilService.updatePropertyPanelOptions($is);
3834+
}
38313835
}));
38323836
}
38333837
};

0 commit comments

Comments
 (0)