This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,15 @@ angular.module('search', [])
11
11
var MIN_SEARCH_LENGTH = 2 ;
12
12
if ( q . length >= MIN_SEARCH_LENGTH ) {
13
13
docsSearch ( q ) . then ( function ( hits ) {
14
- var results = { } ;
14
+ // Make sure the areas are always in the same order
15
+ var results = {
16
+ api : [ ] ,
17
+ guide : [ ] ,
18
+ tutorial : [ ] ,
19
+ error : [ ] ,
20
+ misc : [ ]
21
+ } ;
22
+
15
23
angular . forEach ( hits , function ( hit ) {
16
24
var area = hit . area ;
17
25
Original file line number Diff line number Diff line change 147
147
< div class ="search-results-container " ng-show ="hasResults ">
148
148
< div class ="container ">
149
149
< div class ="search-results-frame ">
150
- < div ng-repeat ="(key, value) in results " class ="search-results-group " ng-class ="colClassName + ' col-group-' + key ">
150
+ < div ng-repeat ="(key, value) in results track by key " class ="search-results-group " ng-class ="colClassName + ' col-group-' + key " ng-show =" value.length > 0 ">
151
151
< h4 class ="search-results-group-heading "> {{ key }}</ h4 >
152
152
< ul class ="search-results ">
153
153
<!-- Do not insert a line break between li and a. Chrome will insert an actual line-break, which breaks the list item view.
You can’t perform that action at this time.
0 commit comments