Skip to content

Commit

Permalink
Merge pull request #182 from tomickigrzegorz:prevent-scroll-up
Browse files Browse the repository at this point in the history
feat: Extend prevent-scroll-up
  • Loading branch information
tomickigrzegorz authored Oct 3, 2023
2 parents 24032f0 + c9864a8 commit c875dd5
Show file tree
Hide file tree
Showing 25 changed files with 1,464 additions and 1,142 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@babel/preset-env"
]
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 2023-10-03 (1.9.0)
### Added

- preventScrollUp - the parameter has been extended in such a way that the selected item (gray rows) is still visible after reopening the results.


## 2023-05-28 (1.8.9)
### Added

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ See the demo - [example](https://tomickigrzegorz.github.io/autocomplete/)
#### CSS

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.8.9/dist/css/autocomplete.min.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.9.0/dist/css/autocomplete.min.css"/>
```

#### JavaScript

```html
<script src="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.8.9/dist/js/autocomplete.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.9.0/dist/js/autocomplete.min.js"></script>
```

##### -- OR --
Expand Down Expand Up @@ -154,7 +154,7 @@ npm run prod
| selectFirst | boolean | `false` | | Default selects the first item in the list of results |
| insertToInput | boolean | `false` | | Adding an element selected with arrows to the input field |
| disableCloseOnSelect | boolean | `false` | | Prevents results from hiding after clicking on an item from the results list |
| preventScrollUp | boolean | `false` | | Prevents the results from scrolling up when we have scrolling. It also works when we click a second time when we have results. The results are shown in the same place. |
| preventScrollUp | boolean | `false` | | The parameter prevents the results from scrolling up when scrolling after reopening the results. The results are displayed in the same place. The selected item does not disappear and is still selected. |
| showAllValues | boolean | `false` | | This option will toggle showing all values when the input is clicked, like a default dropdown |
| cache | boolean | `false` | | The characters entered in the input field are cached |
| howManyCharacters | number | `1` | | The number of characters entered should start searching |
Expand Down Expand Up @@ -464,9 +464,9 @@ Configuration for IE:
### cdn
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.8.9/dist/js/polyfill.js
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.8.9/dist/js/autocomplete.ie.min.js
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.8.9/dist/css/autocomplete.ie.min.css
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.9.0/dist/js/polyfill.js
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.9.0/dist/js/autocomplete.ie.min.js
- https://cdn.jsdelivr.net/gh/tomickigrzegorz/autocomplete@1.9.0/dist/css/autocomplete.ie.min.css
### cdn polyfill from npm
Expand Down
36 changes: 22 additions & 14 deletions dist/js/autocomplete.esm.js

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

2 changes: 1 addition & 1 deletion dist/js/autocomplete.esm.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit c875dd5

Please sign in to comment.