mirror of
https://github.com/nextcloud/server.git
synced 2026-04-08 02:26:12 -04:00
correctly clear searchbox when switching filelists
This commit is contained in:
parent
10038640ae
commit
7a812801db
2 changed files with 11 additions and 0 deletions
|
|
@ -1713,6 +1713,9 @@
|
|||
if (OCA.Search.files) {
|
||||
OCA.Search.files.setFileList(this);
|
||||
}
|
||||
if (OC.Search) {
|
||||
OC.Search.clear();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Update UI based on the current selection
|
||||
|
|
|
|||
|
|
@ -229,6 +229,14 @@
|
|||
$searchResults.find('tr.result').remove();
|
||||
lastQuery = false;
|
||||
};
|
||||
this.clear = function() {
|
||||
self.hideResults();
|
||||
if(self.hasFilter(getCurrentApp())) {
|
||||
self.getFilter(getCurrentApp())('');
|
||||
}
|
||||
$searchBox.val('');
|
||||
$searchBox.blur();
|
||||
};
|
||||
|
||||
/**
|
||||
* Event handler for when scrolling the list container.
|
||||
|
|
|
|||
Loading…
Reference in a new issue