Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidLoad() {
if (this.ripple) {
this.listItemRipple = MDCRipple.attachTo(this.listItem);
// this.listItemRipple.unbounded = true
}
}
componentDidUnload() {
attachRipple() {
if (this.props.ripple && this.control) {
MDCRipple.attachTo(this.control);
}
}
// Build the className based on component names and mdc props
reInstantiateRipple () {
if (this.ripple) {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
MDCRipple.attachTo(this.$el)
} else {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
this.mdcRipple = undefined
}
}
}
button => MDCRipple.attachTo(button)
);
onFlow(initial: boolean) {
if (initial && this.ripple) {
MDCRipple.attachTo(this.button);
}
}
}
(ripple) => {
MDCRipple.attachTo(ripple);
window.scrollTo(0, 0);
},
);
this.$slots.default.map((n, i) => {
if (i === 0) {
n.elm.classList.add('mdc-ripple-surface')
this.accent ? n.elm.classList.add('mdc-ripple-surface--accent') : n.elm.classList.add('mdc-ripple-surface--primary')
this.mdcRipple = MDCRipple.attachTo(n.elm)
this.mdcRipple.unbounded = this.unbounded
}
})
}
reInstantiateRipple () {
if (this.ripple) {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
MDCRipple.attachTo(this.$el)
} else {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
this.mdcRipple = undefined
}
}
}
window.setTimeout(() => {
for (const listEl of document.querySelectorAll(
'.list-bulk-button, .list-items'
)) {
const list = new MDCList(listEl);
for (const el of list.listElements) {
MDCRipple.attachTo(el);
}
}
}, 500);
}
reInstantiateRipple () {
if (this.ripple) {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
MDCRipple.attachTo(this.$el)
} else {
if (this.mdcRipple) {
this.mdcRipple.destroy()
}
this.mdcRipple = undefined
}
}
}