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

Function resetConfig

packages/core/src/node.ts:2643–2648  ·  view source on GitHub ↗

* Set the configuration options of the node and it's subtree. * * @param node - A FormKitNode | FormKitNode * @param context - A FormKitContext | FormKitContext * * @internal

(node: FormKitNode, context: FormKitContext)

Source from the content-addressed store, hash-verified

2641 * @internal
2642 */
2643function resetConfig(node: FormKitNode, context: FormKitContext) {
2644 const parent = node.parent || undefined
2645 context.config = createConfig(node.config._t, parent)
2646 context.config._n = node
2647 node.walk((n) => n.resetConfig())
2648}
2649
2650/**
2651 * Adds a plugin to the node, its children, and executes it.

Callers

nothing calls this directly

Calls 1

createConfigFunction · 0.70

Tested by

no test coverage detected