MCPcopy Create free account
hub / github.com/bytebase/bytebase / toggleValue

Function toggleValue

frontend/src/react/components/ExprEditor.tsx:526–532  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

524 };
525
526 const toggleValue = (v: string) => {
527 if (value.includes(v)) {
528 onChange(value.filter((x) => x !== v));
529 } else {
530 onChange([...value, v]);
531 }
532 };
533
534 const removeValue = (v: string) => {
535 onChange(value.filter((x) => x !== v));

Callers 2

MultiSearchableSelectFunction · 0.85
MultiCheckSelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected