From af17564437c5af3b9d9ae1e92564b70c6e4edc49 Mon Sep 17 00:00:00 2001 From: Bartosz Cylwik Date: Tue, 18 Jul 2023 11:52:15 +0200 Subject: [PATCH] Ripple - fix issue with class customization --- src/js/methods/ripple.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/methods/ripple.js b/src/js/methods/ripple.js index 1611df43b..c0bf39e31 100644 --- a/src/js/methods/ripple.js +++ b/src/js/methods/ripple.js @@ -136,10 +136,11 @@ class Ripple { this._isMinWidthSet = true; } + this._options = this._getConfig(); + this._classes = this._getClasses(); + this._initialClasses = [...this._element.classList]; Manipulator.addClass(this._element, this._classes.ripple); - - this._options = this._getConfig(); this._createRipple(event); } @@ -268,7 +269,7 @@ class Ripple { return config; } - _getClasses(classes) { + _getClasses(classes = {}) { const dataAttributes = Manipulator.getDataClassAttributes(this._element); classes = {