Skip to content

Commit

Permalink
Version 3.2.0 => Release History for details
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekRaafat committed Jan 7, 2019
1 parent 9709cc2 commit 7a27291
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 21 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<br>
<br>

> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.1**
> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.2**
autoComplete.js is a simple pure vanilla Javascript library that's progressively designed for speed, high versatility and seamless integration with wide range of projects & systems, made for users and developers in mind.

Expand Down Expand Up @@ -52,13 +52,13 @@ git clone https://github.com/TarekRaafat/autoComplete.js.git
`CSS`

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/css/autoComplete.min.css">
```

`JS`

```html
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/js/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/js/autoComplete.min.js"></script>
```

- <a href="https://www.npmjs.com/package/@tarekraafat/autocomplete.js">npm</a> install `(Node Package Manager)`
Expand Down
4 changes: 2 additions & 2 deletions dist/js/autoComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
};
var createResultsList = function createResultsList(renderResults) {
resultsList = document.createElement("ul");
resultsList.setAttribute("id", select.resultsList);
if (renderResults.container) {
renderResults.container(resultsList);
select.resultsList = renderResults.container(resultsList) || select.resultsList;
}
resultsList.setAttribute("id", select.resultsList);
renderResults.destination.insertAdjacentElement(renderResults.position, resultsList);
};
var highlight = function highlight(value) {
Expand Down
Binary file modified dist/js/autoComplete.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/js/autoComplete.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/js/autoComplete.min.js.gz
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<h1>autoComplete.js</h1>

> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.1**
> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">:rocket: Live Demo</a> **v3.2**
autoComplete.js is a simple pure vanilla Javascript library that's progressively designed for speed, high versatility and seamless integration with wide range of projects & systems, made for users and developers in mind.

Expand Down Expand Up @@ -67,13 +67,13 @@ npm run build
`CSS`

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/css/autoComplete.min.css">
```

`JS`

```html
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/js/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/js/autoComplete.min.js"></script>
```

- <img src="https://cdn0.iconfinder.com/data/icons/HTML5/512/HTML_Logo.png" alt="HTML" width="40px"> HTML Local load
Expand Down Expand Up @@ -115,7 +115,7 @@ const autoComplete = require("@tarekraafat/autocomplete.js/dist/js/autoComplete"
```html
<link rel="stylesheet" href="./css/autoComplete.css">
OR
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/css/autoComplete.min.css">
```

2. Assign the default `id` value `"autoComplete"` to the desired input field or use any custom `id/class` and configure the API selector accordingly in `Step 4`
Expand All @@ -130,7 +130,7 @@ OR
<script src="./js/autoComplete.min.js"></script>
<script src="./js/index.js"></script>
OR
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/js/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/js/autoComplete.min.js"></script>
<script src="./js/index.js"></script>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="./img/autoComplete.js.svg" alt= "autoComplete.js Logo" style="padding-bottom: 50px; width: 250px;">
</a>

> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">Live Demo</a> **v3.1**
> Simple autocomplete pure vanilla Javascript library. <a href="https://tarekraafat.github.io/autoComplete.js/demo/" target="\_blank">Live Demo</a> **v3.2**
autoComplete.js is a simple pure vanilla Javascript library that's progressively designed for speed,<br>high versatility and seamless integration with wide range of projects & systems.

Expand Down
4 changes: 2 additions & 2 deletions docs/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/css/autoComplete.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="./css/main.css">
<link href="https://fonts.googleapis.com/css?family=PT+Sans" rel="stylesheet">
</head>
Expand Down Expand Up @@ -118,7 +118,7 @@ <h4>mode</h4>
</div>
</footer>
</div>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.1.0/dist/js/autoComplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/TarekRaafat/autoComplete.js@3.2.0/dist/js/autoComplete.min.js"></script>
<script src="./js/index.js"></script>
</body>

Expand Down
8 changes: 6 additions & 2 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ Release flags:

## Release Notes

- v3.1.0 :sparkles:
- v3.2.0 :sparkles:

- Added API for rendered results list `resultsList > container` function
- API Enhancements over rendered results list container `resultsList > container` function **(Thanks @albu77)**

- v3.1.0

- Added API for rendered results list container `resultsList > container` function **(Thanks @albu77)**
- API Enhancements

- v3.0.0
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "autocomplete.js",
"version": "3.1.0",
"version": "3.2.0",
"description": "Simple autocomplete pure vanilla Javascript library.",
"main": "dist/js/autoComplete.js",
"browser": "dist/js/autoComplete.min.js",
Expand Down
7 changes: 3 additions & 4 deletions src/views/autoCompleteView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const getInput = selector => (typeof selector === "string" ? document.querySelec
// Creats the results list HTML tag
const createResultsList = renderResults => {
resultsList = document.createElement("ul");
resultsList.setAttribute("id", select.resultsList);
if (renderResults.container) {
renderResults.container(resultsList);
select.resultsList = renderResults.container(resultsList) || select.resultsList;
}
resultsList.setAttribute("id", select.resultsList);
renderResults.destination.insertAdjacentElement(renderResults.position, resultsList);
};

Expand Down Expand Up @@ -79,8 +79,7 @@ const getSelection = (field, callback, resultsValues, dataKey) => {
results: resultsValues.map(record => record.source),
selection: resultsValues.find(value => {
const resValue = value.source[dataKey] || value.source;
return resValue === event.target.closest(`.${select.result}`)
.getAttribute(dataAttribute);
return resValue === event.target.closest(`.${select.result}`).getAttribute(dataAttribute);
}).source
});
// Clear Results after selection is made
Expand Down

0 comments on commit 7a27291

Please sign in to comment.