MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / onChange

Function onChange

ui/src/components/RelayIdInput.tsx:39–54  ·  view source on GitHub ↗
(e: React.ChangeEvent<HTMLInputElement>)

Source from the content-addressed store, hash-verified

37 };
38
39 const onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
40 const v = e.target.value;
41 const match = v.match(/[A-Fa-f0-9]/g);
42
43 let value = "";
44 if (match) {
45 if (match.length > 8) {
46 value = match.slice(0, 8).join("");
47 } else {
48 value = match.join("");
49 }
50 }
51
52 setValue(value);
53 updateField(value);
54 };
55
56 const onByteOrderSelect = (v: string) => {
57 if (v === byteOrder) {

Callers

nothing calls this directly

Calls 1

updateFieldFunction · 0.85

Tested by

no test coverage detected