almino / semantic-ui-vue2

Semantic UI Integration for Vue 2
123 stars 11 forks source link

Dropdown.vue: Don't access items at negative indices #8

Open AlbinoDrought opened 7 years ago

AlbinoDrought commented 7 years ago

I was having issues when doing the following on a 'selectable' dropdown:

It would call scrollIntoView(-1), because the this.selected item no longer existed in the current array of items.

I've added a clause to skip the scrolling if this occurs.