Skip to content

Commit

Permalink
Ensure colour picker retains old value on reload
Browse files Browse the repository at this point in the history
when in dynamic output mode
to close #452
  • Loading branch information
Dave Conway-Jones committed Dec 6, 2018
1 parent ce0efe0 commit 087fff8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ui-component/ui-component-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ angular.module('ui').controller('uiComponentController', ['$scope', 'UiEvents',
}
}
$scope.$watch('me.item.value', function() {
if (me.item.dynOutput === "true") { me.valueChanged(20); }
if ((me.item.dynOutput === "true") && (me.item.value !== "")) {
me.valueChanged(20); }
});
break;
}
Expand Down

0 comments on commit 087fff8

Please sign in to comment.