Repository: mdbootstrap/TW-Elements (language: javascript)

Issue:
Select: TypeError: this._element.removeActiveStyles is not a function when calling dispose.
**Describe the bug**
Select.dispose throws TypeError: this._element.removeActiveStyles is not a function.

**To Reproduce**
Call the dispose method on a Select instance.



Discussion / hints:

Fix patch:
diff --git a/src/js/forms/select/index.js b/src/js/forms/select/index.js
index 426a6d322..8c4b16f0c 100644
--- a/src/js/forms/select/index.js
+++ b/src/js/forms/select/index.js
@@ -1351,11 +1351,11 @@ class Select {
 
   _listenToFocusChange(add = true) {
     if (add === false) {
-      EventHandler.remove(this._input, "focus", () =>
+      EventHandler.off(this._input, "focus", () =>
         this._notch.setAttribute(DATA_FOCUSED, "")
       );
 
-      EventHandler.remove(this._input, "blur", () =>
+      EventHandler.off(this._input, "blur", () =>
         this._notch.removeAttribute(DATA_FOCUSED)
       );
       return;
@@ -1613,7 +1613,7 @@ class Select {
       label.removeAttribute(DATA_ACTIVE);
     });
     Manipulator.removeClass(this._element, this._classes.initialized);
-    this._element.removeActiveStyles(DATA_SELECT_INIT);
+    this._element.removeAttribute(DATA_SELECT_INIT);
 
     wrapperParent.removeChild(this._wrapper);
   }


Test patch: