Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-simple-suggest

Package Overview
Dependencies
Maintainers
3
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-simple-suggest - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc