* This node is responsible for deterministically generating an id for this * node. This cannot just be a random id, it _must_ be deterministic to ensure * re-hydration of the form (like post-SSR) produces the same names/ids. * * @param options - A FormKitOptions | FormKitOptions * * @r
(options: FormKitOptions)
| 1835 | * @internal |
| 1836 | */ |
| 1837 | function createName(options: FormKitOptions): string | symbol { |
| 1838 | if (options.parent?.type === 'list') return useIndex |
| 1839 | return options.name || `${options.props?.type || 'input'}_${++nameCount}` |
| 1840 | } |
| 1841 | |
| 1842 | /** |
| 1843 | * Creates the initial value for a node based on the options passed in and the |