diff --git a/src/Autocomplete/doc/index.rst b/src/Autocomplete/doc/index.rst index f87a0bfaeae..1fa3ba3c532 100644 --- a/src/Autocomplete/doc/index.rst +++ b/src/Autocomplete/doc/index.rst @@ -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) {