Don't show empty search results on top of the search input field in the linkpicker
This commit is contained in:
committed by
Sebastiaan Janssen
parent
e387c3b27f
commit
a93cc88756
@@ -9,13 +9,14 @@ function treeSearchResults() {
|
||||
return {
|
||||
scope: {
|
||||
results: "=",
|
||||
selectResultCallback: "="
|
||||
selectResultCallback: "=",
|
||||
emptySearchResultPosition: '@'
|
||||
},
|
||||
restrict: "E", // restrict to an element
|
||||
replace: true, // replace the html element with the template
|
||||
templateUrl: 'views/components/tree/umb-tree-search-results.html',
|
||||
link: function (scope, element, attrs, ctrl) {
|
||||
|
||||
scope.emptySearchResultPosition = scope.emptySearchResultPosition || "center";
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@
|
||||
<umb-tree-search-results
|
||||
ng-if="searchInfo.showSearch"
|
||||
results="searchInfo.results"
|
||||
select-result-callback="selectResult">
|
||||
select-result-callback="selectResult"
|
||||
empty-search-result-position="default">
|
||||
</umb-tree-search-results>
|
||||
|
||||
<div ng-hide="searchInfo.showSearch">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<umb-empty-state ng-if="results.length === 0" position="center">
|
||||
<umb-empty-state ng-if="results.length === 0" position="{{emptySearchResultPosition}}">
|
||||
<localize key="general_searchNoResult"></localize>
|
||||
</umb-empty-state>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user