mirror of
https://github.com/nasa/openmct.git
synced 2025-02-22 10:11:06 +00:00
[Search] More controller tweaking
This commit is contained in:
parent
e43e14ec00
commit
5fa6db72d2
@ -42,6 +42,12 @@ define(function () {
|
|||||||
// We are starting to load.
|
// We are starting to load.
|
||||||
loading = true;
|
loading = true;
|
||||||
|
|
||||||
|
// Update whether the file tree should be displayed
|
||||||
|
// Hide tree only when starting search
|
||||||
|
if (inputText !== '' && inputText !== undefined) {
|
||||||
|
$scope.ngModel.search = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (!maxResults) {
|
if (!maxResults) {
|
||||||
// Reset 'load more'
|
// Reset 'load more'
|
||||||
numResults = INITIAL_LOAD_NUMBER;
|
numResults = INITIAL_LOAD_NUMBER;
|
||||||
@ -53,10 +59,9 @@ define(function () {
|
|||||||
$scope.results = result.hits.slice(0, numResults);
|
$scope.results = result.hits.slice(0, numResults);
|
||||||
|
|
||||||
// Update whether the file tree should be displayed
|
// Update whether the file tree should be displayed
|
||||||
|
// Reveal tree only when finishing search
|
||||||
if (inputText === '' || inputText === undefined) {
|
if (inputText === '' || inputText === undefined) {
|
||||||
$scope.ngModel.search = false;
|
$scope.ngModel.search = false;
|
||||||
} else {
|
|
||||||
$scope.ngModel.search = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we are done loading.
|
// Now we are done loading.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user