(
options?: FormKitOptions & { name?: string }
)
| 3360 | * @internal |
| 3361 | */ |
| 3362 | export function createPlaceholder( |
| 3363 | options?: FormKitOptions & { name?: string } |
| 3364 | ): FormKitPlaceholderNode { |
| 3365 | return { |
| 3366 | __FKP: true, |
| 3367 | uid: Symbol(), |
| 3368 | name: options?.name ?? `p_${nameCount++}`, |
| 3369 | value: options?.value ?? null, |
| 3370 | _value: options?.value ?? null, |
| 3371 | type: options?.type ?? 'input', |
| 3372 | props: {}, |
| 3373 | use: () => { |
| 3374 | // noop |
| 3375 | }, |
| 3376 | input(value: unknown) { |
| 3377 | this._value = value |
| 3378 | this.value = value |
| 3379 | return Promise.resolve() |
| 3380 | }, |
| 3381 | isSettled: true, |
| 3382 | } |
| 3383 | } |
| 3384 | |
| 3385 | /** |
| 3386 | * Determines if a node is a placeholder node. |
no outgoing calls
no test coverage detected