MCPcopy
hub / github.com/mum4k/termdash / OnChange

Function OnChange

widgets/checkbox/options.go:156–160  ·  view source on GitHub ↗

OnChange sets the checkbox's toggle hook. This is the widget's canonical callback surface. Callers that need delayed or asynchronous behavior should build that from this hook so the widget keeps a single stable event path.

(fn ChangeFn)

Source from the content-addressed store, hash-verified

154// or asynchronous behavior should build that from this hook so the widget keeps
155// a single stable event path.
156func OnChange(fn ChangeFn) Option {
157 return option(func(opts *options) {
158 opts.onChange = fn
159 })
160}

Callers 5

newControlsTabFunction · 0.92
mainFunction · 0.92
newControlsTabFunction · 0.92
newStatusControlsFunction · 0.92
TestKeyboardAndMouseFunction · 0.70

Calls 1

optionFuncType · 0.70

Tested by 1

TestKeyboardAndMouseFunction · 0.56