Skip to content

Commit

Permalink
Merge pull request #31 from rmgpinto/master
Browse files Browse the repository at this point in the history
Fixes left navigation when searching for a model.
  • Loading branch information
drewbanin authored May 20, 2019
2 parents d4fd9cf + 2ddcbd9 commit a8fef92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/components/model_tree/model_tree_line.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ function wrapLinkFn($state) {
}

scope.activate = function(item) {
scope.$emit('clearSearch');
item.active = true;
}

Expand Down
4 changes: 4 additions & 0 deletions src/app/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ angular
$('#search').blur();
}

$scope.$on('clearSearch', function() {
$scope.clearSearch();
});

$scope.onSearchKeypress = function(e) {
console.log(e);
if (e.key == 'Escape') {
Expand Down

0 comments on commit a8fef92

Please sign in to comment.