-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.htm
42 lines (42 loc) · 1.99 KB
/
index.htm
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
40
41
42
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Autocomplete Demo</title>
<script type="module" src="src/autocomplete.component.js"></script>
<style>
.section{
padding:25px;
background-color: lightgrey;
border: 2px dashed black;
margin-top: 5px;
}
label{
position: fixed;
right: 15px;
margin-top: 5px;
}
</style>
</head>
<body>
<h1>Autocomplete Simple Demo</h1>
<div id='content'>
<div id='simple' class="section">
<ac-input url='https://restcountries.eu/rest/v2/name/' width='250px' nokeyword=true placeholder='Select country' ></ac-input>
<label>Simple Autocomplete</label>
</div>
<div id='multi' class="section">
<ac-input url='https://restcountries.eu/rest/v2/name/' width='250px' nokeyword=true placeholder='Select country' multiselect=true></ac-input>
<label>Multiselect Autocomplete</label>
</div>
<div id='simpletemplate' class="section">
<ac-input url='https://restcountries.eu/rest/v2/name/' width='250px' nokeyword=true placeholder='Select country' itemtemplate="<div class='resultItem' id='${id}'><i>${name}</i></div>"></ac-input>
<label>Templated Singlemode Autocomplete</label>
</div>
<div id='multipletemplate' class="section">
<ac-input url='https://reqres.in/api/users?page=2' width='250px' nokeyword=true subitem=data placeholder='Select user' multiselect itemtemplate="<div class='resultItem' id='${id}'><img src='${avatar}' style='border-radius:50%; width:50px; height:50px;'/>${email}</div>"></ac-input>
<label>Templated Multiselect Autocomplete</label>
</div>
</div>
</body>
</html>