MCPcopy
hub / github.com/rapi-doc/RapiDoc / onSelectExample

Method onSelectExample

src/components/api-request.js:576–587  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

574
575 // Request-Body Event Handlers
576 onSelectExample(e) {
577 this.selectedRequestBodyExample = e.target.value;
578 const exampleDropdownEl = e.target;
579 window.setTimeout((selectEl) => {
580 const readOnlyExampleEl = selectEl.closest('.example-panel').querySelector('.request-body-param');
581 const userInputExampleTextareaEl = selectEl.closest('.example-panel').querySelector('.request-body-param-user-input');
582 userInputExampleTextareaEl.value = readOnlyExampleEl.innerText;
583
584 const requestPanelEl = this.getRequestPanel({ target: selectEl });
585 this.liveCURLSyntaxUpdate(requestPanelEl);
586 }, 0, exampleDropdownEl);
587 }
588
589 onMimeTypeChange(e) {
590 this.selectedRequestBodyType = e.target.value;

Callers 2

requestBodyTemplateMethod · 0.95
jsonSchemaBodyTemplateFunction · 0.45

Calls 2

getRequestPanelMethod · 0.95
liveCURLSyntaxUpdateMethod · 0.95

Tested by

no test coverage detected