Skip to content

Commit 3f8218f

Browse files
committed
Fix preConnect/connect inversion in "disconnect()" doc examples
1 parent 9cdd16d commit 3f8218f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Autocomplete/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ events that the core Stimulus controller dispatches:
351351
352352
disconnect() {
353353
// You should always remove listeners when the controller is disconnected to avoid side-effects
354-
this.element.removeEventListener('autocomplete:pre-connect', this._onConnect);
355-
this.element.removeEventListener('autocomplete:connect', this._onPreConnect);
354+
this.element.removeEventListener('autocomplete:connect', this._onConnect);
355+
this.element.removeEventListener('autocomplete:pre-connect', this._onPreConnect);
356356
}
357357
358358
_onPreConnect(event) {

src/Cropperjs/doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ custom Stimulus controller:
104104
105105
disconnect() {
106106
// You should always remove listeners when the controller is disconnected to avoid side effects
107-
this.element.removeEventListener('cropperjs:pre-connect', this._onConnect);
108107
this.element.removeEventListener('cropperjs:connect', this._onConnect);
108+
this.element.removeEventListener('cropperjs:pre-connect', this._onPreConnect);
109109
}
110110
111111
_onPreConnect(event) {

src/Swup/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ Stimulus controller:
154154
155155
disconnect() {
156156
// You should always remove listeners when the controller is disconnected to avoid side-effects
157-
this.element.removeEventListener('swup:pre-connect', this._onConnect);
158-
this.element.removeEventListener('swup:connect', this._onPreConnect);
157+
this.element.removeEventListener('swup:connect', this._onConnect);
158+
this.element.removeEventListener('swup:pre-connect', this._onPreConnect);
159159
}
160160
161161
_onPreConnect(event) {

src/Typed/doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Stimulus controller:
9999
100100
disconnect() {
101101
// You should always remove listeners when the controller is disconnected to avoid side-effects
102-
this.element.removeEventListener('typed:pre-connect', this._onConnect);
103-
this.element.removeEventListener('typed:connect', this._onPreConnect);
102+
this.element.removeEventListener('typed:connect', this._onConnect);
103+
this.element.removeEventListener('typed:pre-connect', this._onPreConnect);
104104
}
105105
106106
_onPreConnect(event) {

0 commit comments

Comments
 (0)