1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-04 03:49:28 +02:00

improve search design

This commit is contained in:
Patrik Braun 2017-07-25 21:16:57 +02:00
parent 2569286915
commit 7d146cac87
3 changed files with 13 additions and 4 deletions

View File

@ -27,6 +27,7 @@
padding: 0 20px;
line-height: 1.42857143;
font-weight: 400;
display: block;
}
.autocomplete-item:hover {

View File

@ -1,9 +1,18 @@
<form class="navbar-form" role="search" #SearchForm="ngForm">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search" (keyup)="onSearchChange($event)"
(blur)="onFocusLost()" (focus)="onFocus()" [(ngModel)]="searchText" #name="ngModel"
<input type="text"
class="form-control"
placeholder="Search"
(keyup)="onSearchChange($event)"
(blur)="onFocusLost()"
(focus)="onFocus()"
[(ngModel)]="searchText"
#name="ngModel"
size="30"
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"

View File

@ -116,7 +116,6 @@ export class GallerySearchComponent {
}
private showSuggestions(suggestions: Array<AutoCompleteItem>, searchText: string) {
console.log(suggestions);
this.emptyAutoComplete();
suggestions.forEach((item: AutoCompleteItem) => {
let renderItem = new AutoCompleteRenderItem(item.text, searchText, item.type);