Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

injectSelector.md

47 lines795 Bytes

function injectSelector<TFormData, TFormErrorTypes, TSelected>(
   form, 
   selector?, 
options?): Signal<TSelected>;

Defined in: inject-selector.ts:7

Selects form state as an Angular signal.

Type Parameters

TFormData

TFormData

TFormErrorTypes

TFormErrorTypes extends FormErrorTypes<ValidationIssue, ValidationIssue>

TSelected

TSelected = NoInfer<FormState<TFormData, TFormErrorTypes>>

Parameters

form

FormApi<TFormData, TFormErrorTypes>

selector?

(state) => TSelected

options?

InjectSelectorOptions<TSelected>

Returns

Signal<TSelected>