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

Function handleBodyParamExpansion

components/webhooks/Webhook.tsx:124–129  ·  view source on GitHub ↗
(event: KeyboardEvent<HTMLElement>)

Source from the content-addressed store, hash-verified

122
123 // callback to trigger useSWR() hook after a nested property is clicked
124 function handleBodyParamExpansion(event: KeyboardEvent<HTMLElement>) {
125 // need to cast it because 'closest' isn't necessarily available on
126 // event.target
127 const target = event.target as HTMLElement
128 setClickedBodyParameterName(target.closest('details')?.dataset.nestedParamId)
129 }
130
131 // fires when the webhook action type changes or someone clicks on a nested
132 // body param for the first time. In either case, we now have all the data

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected