forked from Meteor-Community-Packages/meteor-autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 1
/
inputs.html
39 lines (36 loc) · 1.12 KB
/
inputs.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<template name="inputAutocomplete">
<input type="text" {{attributes}}>
{{> autocompleteContainer}}
</template>
<template name="textareaAutocomplete">
<textarea {{attributes}}>{{> UI.contentBlock}}</textarea>
{{> autocompleteContainer}}
</template>
<template name="_autocompleteContainer">
{{#if isShowing}}
<div class='-autocomplete-container'>
{{#if isLoaded}}
{{#unless empty}}
<ul class='-autocomplete-list'>
{{#each filteredList}}
<li class="-autocomplete-item">
{{#with ../currentTemplate }}
{{#with ..}} {{! original 'data' context to itemTemplate}}
{{> ..}} {{! return value from itemTemplate }}
{{/with}}
{{/with}}
</li>
{{/each}}
</ul>
{{else}}
{{> noMatchTemplate }}
{{/unless}}
{{else}}
<i>loading...</i>
{{/if}}
</div>
{{/if}}
</template>
<template name="_noMatch">
(<i>no matches</i>)
</template>