We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16291a4 commit f973177Copy full SHA for f973177
lib/vue-simple-suggest.vue
@@ -206,7 +206,13 @@ export default {
206
return this.inputIsComponent ? '$off' : 'removeEventListener'
207
},
208
hoveredIndex () {
209
- return this.suggestions.findIndex(el => this.hovered && (this.valueProperty(this.hovered) == this.valueProperty(el)))
+ for (let i = 0; i < this.suggestions.length; i++) {
210
+ const el = this.suggestions[i];
211
+ if (this.hovered && (this.valueProperty(this.hovered) == this.valueProperty(el))) {
212
+ return i;
213
+ }
214
215
+ return -1;
216
217
textLength () {
218
return (this.text && this.text.length) || (this.inputElement.value.length) || 0
0 commit comments