MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / toggle

Function toggle

packages/app-core/src/components/DatabaseTableView.tsx:834–844  ·  view source on GitHub ↗
(optValue: string)

Source from the content-addressed store, hash-verified

832 }, [editing, onEndEdit])
833
834 const toggle = (optValue: string): void => {
835 if (multi) {
836 const next = selected.includes(optValue)
837 ? selected.filter((v) => v !== optValue)
838 : [...selected, optValue]
839 onCommit(next.join(', '))
840 } else {
841 onCommit(selected[0] === optValue ? '' : optValue)
842 onEndEdit()
843 }
844 }
845
846 const chips = (
847 <div className="flex flex-wrap gap-1">

Callers 1

SelectCellFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected