mirror of
https://github.com/bpatrik/pigallery2.git
synced 2025-01-20 04:59:33 +02:00
improve search design
This commit is contained in:
parent
2569286915
commit
7d146cac87
@ -27,6 +27,7 @@
|
|||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
line-height: 1.42857143;
|
line-height: 1.42857143;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.autocomplete-item:hover {
|
.autocomplete-item:hover {
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
<form class="navbar-form" role="search" #SearchForm="ngForm">
|
<form class="navbar-form" role="search" #SearchForm="ngForm">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" placeholder="Search" (keyup)="onSearchChange($event)"
|
<input type="text"
|
||||||
(blur)="onFocusLost()" (focus)="onFocus()" [(ngModel)]="searchText" #name="ngModel"
|
class="form-control"
|
||||||
|
placeholder="Search"
|
||||||
|
(keyup)="onSearchChange($event)"
|
||||||
|
(blur)="onFocusLost()"
|
||||||
|
(focus)="onFocus()"
|
||||||
|
[(ngModel)]="searchText"
|
||||||
|
#name="ngModel"
|
||||||
|
size="30"
|
||||||
ngControl="search"
|
ngControl="search"
|
||||||
name="srch-term" id="srch-term" autocomplete="off">
|
name="srch-term"
|
||||||
|
id="srch-term"
|
||||||
|
autocomplete="off">
|
||||||
|
|
||||||
|
|
||||||
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
|
<div class="autocomplete-list" *ngIf="autoCompleteItems.length > 0"
|
||||||
|
@ -116,7 +116,6 @@ export class GallerySearchComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private showSuggestions(suggestions: Array<AutoCompleteItem>, searchText: string) {
|
private showSuggestions(suggestions: Array<AutoCompleteItem>, searchText: string) {
|
||||||
console.log(suggestions);
|
|
||||||
this.emptyAutoComplete();
|
this.emptyAutoComplete();
|
||||||
suggestions.forEach((item: AutoCompleteItem) => {
|
suggestions.forEach((item: AutoCompleteItem) => {
|
||||||
let renderItem = new AutoCompleteRenderItem(item.text, searchText, item.type);
|
let renderItem = new AutoCompleteRenderItem(item.text, searchText, item.type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user