updateRipple

Commons
stable

Sync the v-ripple directive's internal state when its binding changes. Hides an active ripple when disabled and attaches or replaces the event listeners that trigger ripple animations.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

el
required
IRippleHtmlElement
The DOM element carrying the _ripple internal state bag.
binding
required
IRippleDirectiveBinding
Vue directive binding; value enables/disables the ripple and may carry { class, center, circle }; modifiers.center and modifiers.circle override the geometry.
wasEnabled
required
boolean
Whether the directive was enabled before this update. Prevents double-registration of listeners.

API

Return value

The value returned by this util.

No return value. Mutates element listeners and _ripple state in place.

Usage

Examples

Ready-to-paste usage snippets.

Directive updated hook

typescript