Skip to content

Commit

Permalink
Fixed code style
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMordred committed Sep 28, 2020
1 parent 46f57b7 commit b4d759f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dist/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,5 +134,5 @@

.tags-input-typeahead-item-highlighted-default {
color: #fff;
background-color: #007bff;
background-color: #007bff !important;
}
34 changes: 20 additions & 14 deletions src/VoerroTagsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
[wrapperClass + ' tags-input']: true,
'active': isActive,
}">
<span class="tags-input-badge tags-input-badge-pill tags-input-badge-selected-default"
v-for="(tag, index) in tags"
<span v-for="(tag, index) in tags"
:key="index"
class="tags-input-badge tags-input-badge-pill tags-input-badge-selected-default"
>
<slot name="selected-tag"
:tag="tag"
Expand Down Expand Up @@ -46,8 +46,11 @@

<!-- Typeahead/Autocomplete -->
<div v-show="searchResults.length">
<p v-if="typeaheadStyle === 'badges'" :class="`typeahead-${typeaheadStyle}`">
<span v-if="!typeaheadHideDiscard" class="tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default"
<p v-if="typeaheadStyle === 'badges'"
:class="`typeahead-${typeaheadStyle}`"
>
<span v-if="!typeaheadHideDiscard"
class="tags-input-badge typeahead-hide-btn tags-input-typeahead-item-default"
@click.prevent="clearSearchResults(true)"
v-text="discardSearchText"></span>

Expand All @@ -63,20 +66,23 @@
}"></span>
</p>

<ul v-else-if="typeaheadStyle === 'dropdown'" :class="`typeahead-${typeaheadStyle}`">
<li v-if="!typeaheadHideDiscard" class="tags-input-typeahead-item-default typeahead-hide-btn"
<ul v-else-if="typeaheadStyle === 'dropdown'"
:class="`typeahead-${typeaheadStyle}`"
>
<li v-if="!typeaheadHideDiscard"
class="tags-input-typeahead-item-default typeahead-hide-btn"
@click.prevent="clearSearchResults(true)"
v-text="discardSearchText"></li>

<li v-for="(tag, index) in searchResults"
:key="index"
v-html="tag.value"
@mouseover="searchSelection = index"
@mousedown.prevent="tagFromSearchOnClick(tag)"
v-bind:class="{
'tags-input-typeahead-item-default': index != searchSelection,
'tags-input-typeahead-item-highlighted-default': index == searchSelection
}"></li>
:key="index"
v-html="tag.value"
@mouseover="searchSelection = index"
@mousedown.prevent="tagFromSearchOnClick(tag)"
v-bind:class="{
'tags-input-typeahead-item-default': index != searchSelection,
'tags-input-typeahead-item-highlighted-default': index == searchSelection
}"></li>
</ul>
</div>
</div>
Expand Down

0 comments on commit b4d759f

Please sign in to comment.