Skip to content

Commit

Permalink
added directiveConfig to modal to allow dynamic designation of modal id
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Jan 2, 2017
1 parent b5b38ee commit b2f99b2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/directives/modal.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { directiveConfig } from '../util/helpers'

function directive (el, binding, v) {
el.dataset.modal = binding.arg
const config = directiveConfig(binding)
el.dataset.modal = config.value

el.onclick = e => {
e.preventDefault()

v.context.$vuetify.bus.pub(`modal:open:${binding.arg}`)
v.context.$vuetify.bus.pub(`modal:open:${config.value}`)
}
}

Expand Down

0 comments on commit b2f99b2

Please sign in to comment.