Skip to content

Commit 92cd281

Browse files
author
alexperez
committed
chore: Editing code while Console is opened changes the MS URL
1 parent 5529218 commit 92cd281

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

src/ApiConsole.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable lit-a11y/click-events-have-key-events */
21
/**
32
@license
43
Copyright 2018 The Advanced REST client authors <arc@mulesoft.com>
@@ -370,6 +369,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
370369
super();
371370
this._tryitHandler = this._tryitHandler.bind(this);
372371
this._handleServerChange = this._handleServerChange.bind(this);
372+
this._handleSelectionChange = this._handleSelectionChange.bind(this);
373373

374374
this.page = 'docs';
375375
this.compatibility = false;
@@ -659,6 +659,15 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
659659
this.serverValue = value;
660660
}
661661

662+
/**
663+
* Handler for the `apiselectionchange` event dispatched from the components.
664+
* @param {CustomEvent} e
665+
*/
666+
_handleSelectionChange(e) {
667+
const { value } = e.detail;
668+
this.selectedShape = value;
669+
}
670+
662671
render() {
663672
return html`
664673
${this._mainContentTemplate()}
@@ -769,6 +778,7 @@ export class ApiConsole extends AmfHelperMixin(LitElement) {
769778
.eventsTarget="${eventsTarget}"
770779
.credentialsSource="${credentialsSource}"
771780
?persistCache="${persistCache}"
781+
@api-request-panel-selection-changed="${this._handleSelectionChange}"
772782
>
773783
<slot name="custom-base-uri" slot="custom-base-uri"></slot>
774784
</api-request-panel>`;

0 commit comments

Comments
 (0)