mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Search] Tree selection syncs
Selecting something in the search results now also makes it selected in the filetree. It remains selected even when the search results are cleared. (The filetree does not automatically expand to that position though.)
This commit is contained in:
@ -165,7 +165,18 @@ define(
|
||||
* @returns true if this should be highlighted
|
||||
*/
|
||||
isSelected: function () {
|
||||
//return isSelected;
|
||||
|
||||
// Modification for compatibility with search.
|
||||
// If this object is the same as the model's selected object
|
||||
// Same being them having the same ID (this allows different
|
||||
// instances of the same thing to be recognized as the same)
|
||||
if ($scope.ngModel.selectedObject.getId() === $scope.domainObject.getId()) {
|
||||
setSelection($scope.domainObject);
|
||||
}
|
||||
return isSelected;
|
||||
|
||||
// TODO: Check to make sure this change doesn't break anything.
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user