March 2018
Beginner to intermediate
514 pages
13h 11m
English
This one is easy, as we are already doing a check in the watcher to find out whether the selectedValue is undefined or not. As such, we can extend the conditional check to include whether the read-only property is true or false:
scope.$watch('selectedValue', function() { if(typeof scope.selectedValue !== "undefined" && !scope.layout.readonly){ app.field(scope.layout.field) .select([parseInt(scope.selectedValue,10)]) }});
Read now
Unlock full access