File tree 1 file changed +14
-9
lines changed
src/librustdoc/html/static/js
1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -2815,15 +2815,7 @@ ${item.displayPath}<span class="${type}">${name}</span>\
2815
2815
}
2816
2816
}
2817
2817
2818
- let crates = "" ;
2819
- if ( rawSearchIndex . size > 1 ) {
2820
- crates = " in <div id=\"crate-search-div\"><select id=\"crate-search\">" +
2821
- "<option value=\"all crates\">all crates</option>" ;
2822
- for ( const c of rawSearchIndex . keys ( ) ) {
2823
- crates += `<option value="${ c } " ${ c === filterCrates && "selected" } >${ c } </option>` ;
2824
- }
2825
- crates += "</select></div>" ;
2826
- }
2818
+ let crates = "" ;
2827
2819
2828
2820
let output = `<h1 class="search-results-title">Results${ crates } </h1>` ;
2829
2821
if ( results . query . error !== null ) {
@@ -3885,6 +3877,19 @@ ${item.displayPath}<span class="${type}">${name}</span>\
3885
3877
exports . execQuery = execQuery ;
3886
3878
exports . parseQuery = parseQuery ;
3887
3879
}
3880
+
3881
+
3882
+ console . log ( rawSearchIndex ) ;
3883
+ let crates = "" ;
3884
+ if ( rawSearchIndex . size > 1 ) {
3885
+ crates = "<div id=\"crate-search-div\"><select id=\"crate-search\">" +
3886
+ "<option value=\"all crates\" selected>all crates</option>" ;
3887
+ for ( const c of rawSearchIndex . keys ( ) ) {
3888
+ crates += `<option value="${ c } ">${ c } </option>` ;
3889
+ }
3890
+ crates += "</select></div>" ;
3891
+ }
3892
+ document . getElementById ( "search-focus-panel" ) . innerHTML = crates ;
3888
3893
}
3889
3894
3890
3895
if ( typeof window !== "undefined" ) {
You can’t perform that action at this time.
0 commit comments