-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #839 from mulesoft/fix/W-14071465/Editing-code-whi…
…le-Console-is-opened-changes-the-MS-URL [W14071465] Editing code while Console is opened changes the MS URL
- Loading branch information
Showing
2 changed files
with
17 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
/* eslint-disable lit-a11y/click-events-have-key-events */ | ||
/** | ||
@license | ||
Copyright 2018 The Advanced REST client authors <[email protected]> | ||
|
@@ -370,6 +369,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { | |
super(); | ||
this._tryitHandler = this._tryitHandler.bind(this); | ||
this._handleServerChange = this._handleServerChange.bind(this); | ||
this._handleSelectionChange = this._handleSelectionChange.bind(this); | ||
|
||
this.page = 'docs'; | ||
this.compatibility = false; | ||
|
@@ -659,6 +659,15 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { | |
this.serverValue = value; | ||
} | ||
|
||
/** | ||
* Handler for the `apiselectionchange` event dispatched from the components. | ||
* @param {CustomEvent} e | ||
*/ | ||
_handleSelectionChange(e) { | ||
const { value } = e.detail; | ||
this.selectedShape = value; | ||
} | ||
|
||
render() { | ||
return html` | ||
${this._mainContentTemplate()} | ||
|
@@ -769,6 +778,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) { | |
.eventsTarget="${eventsTarget}" | ||
.credentialsSource="${credentialsSource}" | ||
?persistCache="${persistCache}" | ||
@api-request-panel-selection-changed="${this._handleSelectionChange}" | ||
> | ||
<slot name="custom-base-uri" slot="custom-base-uri"></slot> | ||
</api-request-panel>`; | ||
|