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

Commit

Permalink
Studio Performance[WM-17843]: Update properties panel for a widget on…
Browse files Browse the repository at this point in the history
…ly after it is selected in canvas

Change-Id: I44abe18e893bd5cb385f6dbebfb25b04df275059
  • Loading branch information
vibhu-imaginea committed Sep 18, 2019
1 parent f7dd1e3 commit f1c7a7a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/main/webapp/scripts/modules/widgets/base/Base.js
Original file line number Diff line number Diff line change
Expand Up @@ -3824,10 +3824,14 @@ WM.module('wm.widgets.base', [])
if (CONSTANTS.isRunMode) {
return;
}
var property = 'bind' + (attrs.listenProperty || 'dataset');

$is.$on('$destroy', $is.$watch(property, function () {
WidgetUtilService.updatePropertyPanelOptions($is);
var property = 'bind' + (attrs.listenProperty || 'dataset'),
isActive;
$is.$on('$destroy', $is.$watchGroup([property, 'active'], function (arr_Expr_Active) {
isActive = arr_Expr_Active[1];
// update property panel options only if the widget is selected in canvas.
if (isActive) {
WidgetUtilService.updatePropertyPanelOptions($is);
}
}));
}
};
Expand Down

0 comments on commit f1c7a7a

Please sign in to comment.