Skip to content

Commit

Permalink
Fix lint error "You should not mix 'v-for' with 'v-if'"
Browse files Browse the repository at this point in the history
  • Loading branch information
mariosh346 committed Mar 5, 2019
1 parent 7f30c6e commit 47d1039
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@

<div
v-for="(item, i) in itemsComputed"
v-if="i < itemsLimit"
:key="'IZ-item-' + i"
:class="{
'IZ-select__item': true,
'IZ-select__item--selected': isItemSelected(item)
}"
tabindex="-1"
@click="onClickSelectItem(item)"
:ref="'items'"
ref="items"
>
<slot
:item="item"
name="item"
v-if="i < itemsLimit"
>
<span>
{{ getItemText(item) }}
Expand Down Expand Up @@ -150,7 +150,6 @@ export default {
focused: false,
selectedItem: null,
selectedItemByArrows: null,
// used only in the "search" computed (setter + getter)
searchData: ''
}),
computed,
Expand Down
2 changes: 1 addition & 1 deletion src/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
itemsLimit: {
type: Number,
default: 20,
note: 'property in item for text'
note: 'items limit'
},
itemText: {
type: String,
Expand Down

0 comments on commit 47d1039

Please sign in to comment.