[Search] Declare UI components as templates
Declare Search UI components as templates instead of representations so that they are not removed from the DOM when no domain object is supplied. Fixes nasa/openmctweb#234
This commit is contained in:
@@ -27,6 +27,12 @@
|
||||
}
|
||||
],
|
||||
"representations": [
|
||||
{
|
||||
"key": "search-item",
|
||||
"templateUrl": "templates/search-item.html"
|
||||
}
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "search",
|
||||
"templateUrl": "templates/search.html"
|
||||
@@ -34,10 +40,6 @@
|
||||
{
|
||||
"key": "search-menu",
|
||||
"templateUrl": "templates/search-menu.html"
|
||||
},
|
||||
{
|
||||
"key": "search-item",
|
||||
"templateUrl": "templates/search-item.html"
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<a class="ui-symbol clear-icon"
|
||||
ng-class="{content: !(ngModel.input === '' || ngModel.input === undefined)}"
|
||||
ng-click="ngModel.input = ''; controller.search()">
|
||||

|
||||

|
||||
</a>
|
||||
|
||||
<!-- Menu icon/button 'v' -->
|
||||
@@ -53,12 +53,12 @@
|
||||
</a>
|
||||
|
||||
<!-- Menu -->
|
||||
<mct-representation key="'search-menu'"
|
||||
<mct-include key="'search-menu'"
|
||||
class="menu-element search-menu-holder"
|
||||
ng-class="{off: !toggle.isActive()}"
|
||||
ng-model="ngModel"
|
||||
ng-click="toggle.setState(true)">
|
||||
</mct-representation>
|
||||
</mct-include>
|
||||
</div>
|
||||
|
||||
<!-- Active filter display -->
|
||||
@@ -71,7 +71,7 @@
|
||||

|
||||
</a>
|
||||
|
||||
Filtered by: {{ ngModel.filtersString }}
|
||||
Filtered by: {{ ngModel.filtersString }}
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user