Skip to content

Fix #253 #254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 24, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/vsSelect/vsSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</div>
</transition>
</div>

<transition-group
@before-enter="beforeEnter"
@enter="enter"
Expand Down Expand Up @@ -266,6 +266,7 @@ export default {
let items = this.$children
items.map((item)=>{
// let text = item.$el.innerText.replace('check_circle','')
if (!('vsText' in item)) return
let text = item.vsText
if(this.vsMultiple){
let valuesx = value.split(',')
Expand Down Expand Up @@ -361,7 +362,7 @@ export default {
},
closeOptions(){
// this.$refs.inputselect.blur()
this.active = false
this.active = false
this.setLabelClass(this.$refs.inputSelectLabel, false)
document.removeEventListener('click',this.clickBlur)
},
Expand Down Expand Up @@ -408,7 +409,7 @@ export default {
if (!label) {
return
}

if (focusing) {
label.classList.add('input-select-label-' + this.vsColor + '--active')
return
Expand Down
6 changes: 4 additions & 2 deletions src/components/vsSelect/vsSelectItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,17 @@ export default {
}
}

const children = this.$parent.$slots.default
if(orientation == 'prev'){
orientationObject = 'previousSibling'
lengthx = this.$parent.$children.length - 1
lengthx = children.length
}
let nextElement = getNextLi(this.$el[orientationObject],orientationObject)
if(nextElement){
nextElement.querySelector('.vs-select-item-btn').focus()
} else {
getNextLi(this.$parent.$children[lengthx].$el,orientationObject).querySelector('.vs-select-item-btn').focus()
if (lengthx === children.length) lengthx--
getNextLi(children[lengthx].elm,orientationObject).querySelector('.vs-select-item-btn').focus()
}
},
focusValue(){
Expand Down