mirror of
https://github.com/nasa/openmct.git
synced 2025-01-19 11:17:04 +00:00
[Tree] Trigger digest on tree selection change
This commit is contained in:
parent
a3a9393d1b
commit
02ec6db104
@ -29,8 +29,12 @@ define([
|
||||
function link(scope, element, attrs) {
|
||||
var treeView = new TreeView(),
|
||||
expr = $parse(attrs.mctModel),
|
||||
assign = expr.assign.bind(expr, scope.$parent),
|
||||
unobserve = treeView.observe(assign);
|
||||
unobserve = treeView.observe(function (domainObject) {
|
||||
if (domainObject !== expr(scope.$parent)) {
|
||||
expr.assign(scope.$parent, domainObject);
|
||||
scope.$apply();
|
||||
}
|
||||
});
|
||||
|
||||
element.append(angular.element(treeView.elements()));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user