Skip to content
This repository has been archived by the owner on Nov 30, 2020. It is now read-only.

Commit

Permalink
fix(menu): Access vue instance instead of rendered node (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
matsp committed Jun 25, 2018
1 parent 5ddd679 commit a08936e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions components/menu/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ export default {
updateSlot () {
if (this.$slots.default) {
this.$slots.default.map(n => {
n.elm.classList.add('mdc-menu__items')
n.elm.setAttribute('role', 'menu')
n.elm.setAttribute('aria-hidden', 'true')
n.componentOptions.children
.filter(n => n.elm.className.indexOf('mdc-list-item') > -1)
n.componentInstance.$el.classList.add('mdc-menu__items')
n.componentInstance.$el.setAttribute('role', 'menu')
n.componentInstance.$el.setAttribute('aria-hidden', 'true')
n.componentInstance.$children
.filter(n => n.$el.classList.contains('mdc-list-item'))
.map(n => {
n.elm.setAttribute('tabindex', '0')
n.elm.setAttribute('role', 'menuitem')
n.$el.setAttribute('tabindex', '0')
n.$el.setAttribute('role', 'menuitem')
})
})
}
Expand Down

0 comments on commit a08936e

Please sign in to comment.