vue-simple-suggest
Advanced tools
Comparing version 1.1.2 to 1.2.0
{ | ||
"name": "vue-simple-suggest", | ||
"description": "Feature-rich autocomplete component for Vue.js", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"author": "KazanExpress", | ||
"license": "MIT", | ||
"repository": "KazanExpress/vue-simple-suggest", | ||
"bugs": { | ||
"url": "https://github.com/KazanExpress/vue-simple-suggest/issues" | ||
}, | ||
"main": "index.js", | ||
@@ -8,0 +12,0 @@ "scripts": { |
@@ -70,10 +70,27 @@ # vue-simple-suggest | ||
|Key | Description| | ||
These are default keyboard shortcuts. | ||
Can be customized with the [`controls` prop](#props). | ||
Default scheme: | ||
|Key (key code) | Description| | ||
|-|-| | ||
|`Escape` | If the suggestions list is shown - hide it.| | ||
|`ArrowDown` | If the suggestions list is hidden - show it.| | ||
|`ArrowUp`/`ArrowDown` | Cycle (hover) through suggestions.| | ||
|`Enter` | If the list is shown - chooses the highlighted element, if the list is hidden - refills the suggestions based on current input text.| | ||
|`Ctrl + Space`/`Cmd + Space` | Select the first element in the list.| | ||
|`Escape` (27) | If the suggestions list is shown - hide it. Defined by `hideList` property. | | ||
|`ArrowDown` (40) | If the suggestions list is hidden - show it. Defined by `selectionUp` property. | | ||
|`ArrowUp` (38) / `ArrowDown` (40) | Cycle (hover) through suggestions. Defined by `selectionUp``selectionDown` properties respectfully. | | ||
|`Enter` (13) | If the list is shown - chooses the highlighted element, if the list is hidden - refills the suggestions based on current input text. Defined by `select` property.| | ||
|`(Ctrl/⌘) + Space` (32) | Select the first element in the list. Defined by `autocomplete` property. Works with `Ctrl` modifier key (windows) or `⌘` modifier key (mac). | | ||
JS object: | ||
```js | ||
{ | ||
selectionUp: [38], | ||
selectionDown: [40], | ||
select: [13], | ||
hideList: [27], | ||
autocomplete: [32] | ||
} | ||
``` | ||
----- | ||
@@ -98,2 +115,9 @@ ## Component API | ||
:value="defaultValue" | ||
:controls="{ | ||
selectionUp: [38, 33], | ||
selectionDown: [40, 34], | ||
select: [13, 36], | ||
hideList: [27, 35], | ||
autocomplete: [32, 13], | ||
}" | ||
@input="onInputEvent" | ||
@@ -139,2 +163,3 @@ @select="onSuggestSelect" | ||
|--------------------------------|----------|----------|--------------------------------------------------------------| | ||
| `controls` | Object | See [default controls](#default-controls) | Determines the keyboard shortcuts in key-codes (for browser-compatibility purposes). Arrays provide the ability to assign multiple keys to one action. Consists of 5 array fields: `selectionUp`, `selectionDown`, `select`, `hideList` and `autocomplete`. | | ||
| `maxSuggestions` | Number | `10` | The maximum amount of suggestions to display. Set to 0 for infinite suggestions. | | ||
@@ -318,3 +343,3 @@ | `displayAttribute` | String | `'title'` | The property in a suggestion object to display in a list. Supports dotted paths. | | ||
![](assets/screenshot.jpg) | ||
![](/assets/screenshot.jpg) | ||
@@ -321,0 +346,0 @@ ##### Custom miscellanious item slots |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
52889
0
370