MCPcopy
hub / github.com/mitmproxy/mitmproxy / handleChange

Function handleChange

web/src/js/components/Modal/OptionInput.tsx:106–116  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

104 const [textAreaValue, setTextAreaValue] = React.useState(value.join("\n"));
105
106 const handleChange = (e) => {
107 const newValue = e.target.value;
108 setTextAreaValue(newValue); //save in the state the current input value
109 onChange(
110 //we send to the backend only the strings that are not empty
111 newValue
112 .split("\n")
113 .map((line) => line.trim())
114 .filter((line) => line !== ""),
115 );
116 };
117
118 return (
119 <textarea

Callers

nothing calls this directly

Calls 4

onChangeFunction · 0.85
filterMethod · 0.45
mapMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…