( node: FormKitNode, prop: string, value: unknown )
| 10 | * @internal |
| 11 | */ |
| 12 | export 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. |