Merge pull request #6934 from kjac/v8/fix/treepicker-search-autofocus

V8: Add autofocus to treepicker search box
This commit is contained in:
Poornima Nayar
2020-02-05 20:57:07 +00:00
committed by GitHub
3 changed files with 6 additions and 4 deletions

View File

@@ -14,7 +14,8 @@ function treeSearchBox(localizationService, searchService, $q) {
section: "@",
datatypeKey: "@",
hideSearchCallback: "=",
searchCallback: "="
searchCallback: "=",
autoFocus: "="
},
restrict: "E", // restrict to an element
replace: true, // replace the html element with the template

View File

@@ -37,7 +37,8 @@
search-from-name="{{vm.searchInfo.searchFromName}}"
show-search="{{vm.searchInfo.showSearch}}"
datatype-key="{{vm.searchInfo.dataTypeKey}}"
section="{{vm.section}}">
section="{{vm.section}}"
auto-focus="true">
</umb-tree-search-box>
</div>

View File

@@ -5,9 +5,9 @@
ng-model="term"
class="umb-search-field search-query -full-width-input"
placeholder="{{searchPlaceholderText}}"
focus-when="{{showSearch}}">
umb-auto-focus="{{autoFocus ? 'true' : 'false'}}">
<h4 ng-if="showSearch && searchFromName">
<small><localize key="general_search">Search</localize>:&nbsp;</small>
{{searchFromName}}
</h4>
</div>
</div>