MCPcopy Create free account
hub / github.com/github/docs / handleExampleSelection

Function handleExampleSelection

components/rest/RestCodeSamples.tsx:105–107  ·  view source on GitHub ↗
(event: FormEvent<HTMLSelectElement>)

Source from the content-addressed store, hash-verified

103 const displayedExample: ExampleT = languageExamples[selectedExample.languageIndex]
104
105 const handleExampleSelection = (event: FormEvent<HTMLSelectElement>) => {
106 setSelectedExample(exampleSelectOptions[Number(event.currentTarget.value)])
107 }
108
109 const handleResponseSelection = (responseKey: string) => {
110 setSelectedResponse(responseKey)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected