Skip to content

Commit f7d8d04

Browse files
committed
v10.2.6 => Release Notes for details, resolve #158
1 parent 6f98e16 commit f7d8d04

18 files changed

+150
-87
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ autoComplete.js is a simple, pure vanilla Javascript library progressively desig
5151
`JS`
5252

5353
```html
54-
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.5/dist/autoComplete.min.js"></script>
54+
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/autoComplete.min.js"></script>
5555
```
5656

5757
`CSS`
5858

5959
```html
60-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.5/dist/css/autoComplete.min.css">
60+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/css/autoComplete.min.css">
6161
```
6262
#### Package Manager
6363

dist/autoComplete.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,10 @@
419419
}
420420
};
421421
var next = function next(ctx) {
422-
var index = ctx.cursor + 1;
423-
goTo(index, ctx);
422+
goTo(ctx.cursor + 1, ctx);
424423
};
425424
var previous = function previous(ctx) {
426-
var index = ctx.cursor - 1;
427-
goTo(index, ctx);
425+
goTo(ctx.cursor - 1, ctx);
428426
};
429427
var select = function select(ctx, event, index) {
430428
index = index >= 0 ? index : ctx.cursor;
@@ -439,8 +437,7 @@
439437
var items = Array.from(ctx.list.querySelectorAll(itemTag));
440438
var item = event.target.closest(itemTag);
441439
if (item && item.nodeName === itemTag) {
442-
var index = items.indexOf(item);
443-
select(ctx, event, index);
440+
select(ctx, event, items.indexOf(item));
444441
}
445442
};
446443
var navigate = function navigate(event, ctx) {
@@ -627,7 +624,7 @@
627624
prototype.select = function (index) {
628625
select(this, null, index);
629626
};
630-
autoComplete.search = prototype.search = function (query, record, options) {
627+
prototype.search = function (query, record, options) {
631628
return search(query, record, options);
632629
};
633630
}

dist/autoComplete.js.gz

-14 Bytes
Binary file not shown.

dist/autoComplete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autoComplete.min.js.gz

-7 Bytes
Binary file not shown.

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ wrapper: false,
7777

7878
#### `src` <sub><sup>(required)</sup></sub>
7979
- Type: `Array`|`Function` returns `Array` of results values
80-
- Parameters: (`query`)
80+
- Parameters: (`query`) <small>(works only if `data.cache` is `false`)</small>
8181
- Default: `null`
8282

8383
#### `keys` <sub><sup>(required)</sup></sub>

docs/demo/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
7373
<meta name="theme-color" content="#ffffff">
7474
<link rel="stylesheet" type="text/css" media="screen"
75-
href="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.5/dist/css/autoComplete.min.css">
75+
href="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/css/autoComplete.min.css">
7676
<!-- <link rel="stylesheet" type="text/css" media="screen" href="./css/autoComplete.css"> -->
7777
<link rel="stylesheet" type="text/css" media="screen" href="./css/main.css">
7878
<link href="https://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet">
@@ -150,7 +150,7 @@ <h4>mode</h4>
150150
</div>
151151
</footer>
152152
</div>
153-
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.5/dist/autoComplete.min.js"></script>
153+
<script src="https://cdn.jsdelivr.net/npm/@tarekraafat/autocomplete.js@10.2.6/dist/autoComplete.min.js"></script>
154154
<!-- <script src="./js/autoComplete.js"></script> -->
155155
<script src="./js/index.js"></script>
156156
</body>

docs/demo/js/autoComplete.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -419,12 +419,10 @@
419419
}
420420
};
421421
var next = function next(ctx) {
422-
var index = ctx.cursor + 1;
423-
goTo(index, ctx);
422+
goTo(ctx.cursor + 1, ctx);
424423
};
425424
var previous = function previous(ctx) {
426-
var index = ctx.cursor - 1;
427-
goTo(index, ctx);
425+
goTo(ctx.cursor - 1, ctx);
428426
};
429427
var select = function select(ctx, event, index) {
430428
index = index >= 0 ? index : ctx.cursor;
@@ -439,8 +437,7 @@
439437
var items = Array.from(ctx.list.querySelectorAll(itemTag));
440438
var item = event.target.closest(itemTag);
441439
if (item && item.nodeName === itemTag) {
442-
var index = items.indexOf(item);
443-
select(ctx, event, index);
440+
select(ctx, event, items.indexOf(item));
444441
}
445442
};
446443
var navigate = function navigate(event, ctx) {
@@ -627,7 +624,7 @@
627624
prototype.select = function (index) {
628625
select(this, null, index);
629626
};
630-
autoComplete.search = prototype.search = function (query, record, options) {
627+
prototype.search = function (query, record, options) {
631628
return search(query, record, options);
632629
};
633630
}

docs/demo/js/autoComplete.js.gz

-14 Bytes
Binary file not shown.

docs/demo/js/autoComplete.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)