Skip to content

[Doc] Fix preConnect/connect inversion in "disconnect()" doc examples #1258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Autocomplete/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ events that the core Stimulus controller dispatches:

disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side-effects
this.element.removeEventListener('autocomplete:pre-connect', this._onConnect);
this.element.removeEventListener('autocomplete:connect', this._onPreConnect);
this.element.removeEventListener('autocomplete:connect', this._onConnect);
this.element.removeEventListener('autocomplete:pre-connect', this._onPreConnect);
}

_onPreConnect(event) {
Expand Down
2 changes: 1 addition & 1 deletion src/Cropperjs/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ custom Stimulus controller:

disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side effects
this.element.removeEventListener('cropperjs:pre-connect', this._onConnect);
this.element.removeEventListener('cropperjs:connect', this._onConnect);
this.element.removeEventListener('cropperjs:pre-connect', this._onPreConnect);
}

_onPreConnect(event) {
Expand Down
4 changes: 2 additions & 2 deletions src/Swup/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ Stimulus controller:

disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side-effects
this.element.removeEventListener('swup:pre-connect', this._onConnect);
this.element.removeEventListener('swup:connect', this._onPreConnect);
this.element.removeEventListener('swup:connect', this._onConnect);
this.element.removeEventListener('swup:pre-connect', this._onPreConnect);
}

_onPreConnect(event) {
Expand Down
4 changes: 2 additions & 2 deletions src/Typed/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ Stimulus controller:

disconnect() {
// You should always remove listeners when the controller is disconnected to avoid side-effects
this.element.removeEventListener('typed:pre-connect', this._onConnect);
this.element.removeEventListener('typed:connect', this._onPreConnect);
this.element.removeEventListener('typed:connect', this._onConnect);
this.element.removeEventListener('typed:pre-connect', this._onPreConnect);
}

_onPreConnect(event) {
Expand Down