MCPcopy Create free account
hub / github.com/formkit/formkit / configChange

Function configChange

packages/core/src/config.ts:12–28  ·  view source on GitHub ↗
(
  node: FormKitNode,
  prop: string,
  value: unknown
)

Source from the content-addressed store, hash-verified

10 * @internal
11 */
12export function configChange(
13 node: FormKitNode,
14 prop: string,
15 value: unknown
16): boolean {
17 // When we return false, node.walk will not continue into that child.
18 let usingFallback = true
19 !(prop in node.config._t)
20 ? node.emit(`config:${prop}`, value, false)
21 : (usingFallback = false)
22
23 if (!(prop in node.props)) {
24 node.emit('prop', { prop, value })
25 node.emit(`prop:${prop}`, value)
26 }
27 return usingFallback
28}
29
30/**
31 * Global configuration options.

Callers 2

setFunction · 0.90
setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected