Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (17 sloc) 907 Bytes
<template>
<require from="./autocomplete.css"></require>
<div class="autocomplete-container">
<input class="autocomplete-input ${additionalClass}" autocomplete="off" value.bind="value & debounce:750"
id="autocomplete-input-id" blur.trigger="hideSuggestions()"
keydown.delegate="keyPressed($event)" placeholder.bind="placeholder" focus.trigger="showSuggestions()">
<div class="autocomplete-suggestion" style="display:none">
<div class="list-group">
<a data-index="${$index}" class="list-group-item ${$index == _selected ? 'active' : ''}"
repeat.for="item of _suggestions" mousedown.delegate="select($index)">
<span if.bind="! suggestionTemplate">${valueKey?item[valueKey]:item}</span>
<compose if.bind="suggestionTemplate" view.bind="suggestionTemplate" view-model.bind="item"></compose>
</a>
</div>
</div>
</div>
</template>