summaryrefslogtreecommitdiffstats
path: root/src/angular/autocomplete/autocomplete.component.html.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/angular/autocomplete/autocomplete.component.html.ts')
-rw-r--r--src/angular/autocomplete/autocomplete.component.html.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/angular/autocomplete/autocomplete.component.html.ts b/src/angular/autocomplete/autocomplete.component.html.ts
new file mode 100644
index 0000000..5df7352
--- /dev/null
+++ b/src/angular/autocomplete/autocomplete.component.html.ts
@@ -0,0 +1,14 @@
+export default `
+<div class="sdc-autocomplete-container" [ngClass]="{'results-shown': autoCompleteResults.length}">
+ <sdc-filter-bar
+ [placeholder]="placeholder"
+ [label]="label"
+ [searchQuery]="searchQuery"
+ (searchQueryChange)="onSearchQueryChanged($event)">
+ </sdc-filter-bar>
+ <ul class="autocomplete-results" [@displayResultsAnimation]="autoCompleteResults.length ?'true':'false'">
+ <li *ngFor="let item of autoCompleteResults"
+ (click)="onItemSelected(item)">{{item.value}}</li>
+ </ul>
+</div>
+`;