mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +03:00
Refactor: move disposing properties into the base class (#33740)
Moves more functionality to `base-component`, transferring the responsibility of disposal to parent class. Each component, dusting disposal, sets its protected properties to `null`. So the same can be done in one place for all children components .
This commit is contained in:
+1
-9
@@ -137,16 +137,8 @@ class ScrollSpy extends BaseComponent {
|
||||
}
|
||||
|
||||
dispose() {
|
||||
super.dispose()
|
||||
EventHandler.off(this._scrollElement, EVENT_KEY)
|
||||
|
||||
this._scrollElement = null
|
||||
this._config = null
|
||||
this._selector = null
|
||||
this._offsets = null
|
||||
this._targets = null
|
||||
this._activeTarget = null
|
||||
this._scrollHeight = null
|
||||
super.dispose()
|
||||
}
|
||||
|
||||
// Private
|
||||
|
||||
Reference in New Issue
Block a user