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.2.0 to 1.2.1

lib/misc.js

2

package.json
{
"name": "vue-simple-suggest",
"description": "Feature-rich autocomplete component for Vue.js",
"version": "1.2.0",
"version": "1.2.1",
"author": "KazanExpress",

@@ -6,0 +6,0 @@ "license": "MIT",

@@ -72,3 +72,3 @@ # vue-simple-suggest

Can be customized with the [`controls` prop](#props).
Can be customized with the [`controls` prop](#props). All fields in this `controls` object are optional.

@@ -80,6 +80,7 @@ Default scheme:

|`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. |
|`ArrowDown` (40) | If the suggestions list is hidden - show it. Defined by `selectionDown` 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). |
|`(Ctrl/Shift) + Space` (32) | Select the first element in the list. Defined by `autocomplete` property. Works with `Ctrl` modifier key or `Shift` modifier key. |
|`(Ctrl/Shift) + Enter` (13) | Same as previous, but also hides the suggestions list. |

@@ -93,3 +94,3 @@ JS object:

hideList: [27],
autocomplete: [32]
autocomplete: [32, 13]
}

@@ -164,3 +165,3 @@ ```

|--------------------------------|----------|----------|--------------------------------------------------------------|
| `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`. |
| `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`, all of which are optional. |
| `maxSuggestions` | Number | `10` | The maximum amount of suggestions to display. Set to 0 for infinite suggestions. |

@@ -170,3 +171,3 @@ | `displayAttribute` | String | `'title'` | The property in a suggestion object to display in a list. Supports dotted paths. |

| `list` | Funciton or Array | `() => []` | The array provider function, must accept a query as its only argument. Can return an array or a promise. Can be async. The component behaves as a simple input without this function. |
| `debounce` | Number | `0` | Determines the getList debounce (a time between the input event and a function execution). |
| `debounce` | Number | `0` | Determines the `list` debounce (a time between the input event and a function execution). |
| `destyled` | Boolean | `false` | Whether to cancel the default styling of input and suggestions list. |

@@ -188,5 +189,5 @@ | `removeList` | Boolean | `false` | If true - the suggestion list will be always hidden. |

| `hideList` | - | Fires each time the suggestion list is being hidden. |
| `requestStart` | Current input value (query) | Fires each time a `getList` function starts executing. |
| `requestDone` | Resulting suggestions list | Fires when a `getList` function successfully returns a result and forwards that result as an argument. |
| `requestFailed` | The interrrupting exception | Fires if an exception occurs during the execution of a `getList` funciton. |
| `requestStart` | Current input value (query) | Fires each time a `list` function starts executing. |
| `requestDone` | Resulting suggestions list | Fires when a `list` function successfully returns a result and forwards that result as an argument. |
| `requestFailed` | The interrrupting exception | Fires if an exception occurs during the execution of a `list` funciton. |

@@ -246,2 +247,3 @@ -----

|`hoveredIndex`| - | The current hovered element index. |
|`controlScheme`| [Default Controls](#default-controls) | The current controls scheme. |

@@ -248,0 +250,0 @@ -----

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