Options
All
  • Public
  • Public/Protected
  • All
Menu

@habx/lib-form-helper - v8.1.0

Index

Type aliases

FieldErrorBehavior: "always" | "never" | "dirty" | "touched"

Describes when the error should be displayed

FormatterCallback<InputValue, Props, FieldValue>: FieldTransform<FieldValue, InputValue, Props>

Type parameters

  • InputValue

  • Props

  • FieldValue = any

ParserCallback<InputValue, Props, FieldValue>: FieldTransform<InputValue, FieldValue, Props>

Type parameters

  • InputValue

  • Props

  • FieldValue = any

ValidationCallback<FieldValue, Props>: (value: FieldValue | undefined, allValues: any, meta: FieldMetaState<FieldValue>, props: Props) => string | undefined | Promise<string | undefined>

Type parameters

  • FieldValue

  • Props

Type declaration

    • (value: FieldValue | undefined, allValues: any, meta: FieldMetaState<FieldValue>, props: Props): string | undefined | Promise<string | undefined>
    • Parameters

      • value: FieldValue | undefined
      • allValues: any
      • meta: FieldMetaState<FieldValue>
      • props: Props

      Returns string | undefined | Promise<string | undefined>

Variables

CodeEditorJSON: LazyExoticComponent<NamedExoticComponent<CodeEditorJSONProps>> = BaseCodeEditorJSON
FieldError: React.FunctionComponent<FieldErrorProps> = ...
FormContext: Context<FormContextProps> = ...
FormSection: React.FunctionComponent<FormSectionProps> = ...
FormSectionWatcher: React.FunctionComponent<FormSectionWatcherProps> = ...

Functions

  • Form<Values, InitialValues>(__namedParameters: FormProps<Values, InitialValues>): Element
  • Type parameters

    • Values

    • InitialValues = Partial<Values>

    Parameters

    • __namedParameters: FormProps<Values, InitialValues>

    Returns Element

  • asyncDebounce<D, Value>(func: (value: Value, ...params: any[]) => undefined | D | Promise<D>, time: number): (value: Value, ...params: any[]) => undefined | D | Promise<undefined | D>
  • Type parameters

    • D

    • Value

    Parameters

    • func: (value: Value, ...params: any[]) => undefined | D | Promise<D>
        • (value: Value, ...params: any[]): undefined | D | Promise<D>
        • Parameters

          • value: Value
          • Rest ...params: any[]

          Returns undefined | D | Promise<D>

    • time: number

    Returns (value: Value, ...params: any[]) => undefined | D | Promise<undefined | D>

      • (value: Value, ...params: any[]): undefined | D | Promise<undefined | D>
      • Parameters

        • value: Value
        • Rest ...params: any[]

        Returns undefined | D | Promise<undefined | D>

  • joinNames(path: string, newName: undefined | string | number): string
  • Parameters

    • path: string
    • newName: undefined | string | number

    Returns string

  • useFinalFormField<FieldValue, Props>(baseName: string, props: undefined | Props, inputConfig?: InputHookConfig): UseFinalFormFieldValue<FieldValue>
  • useFormAutoSubmitDecorator<Params>(config?: UseFormAutoSubmitDecoratorConfig): Decorator<Params, Partial<Params>>
  • useFormKeyboardSubmitDecorator<Params>(): Decorator<Params, Partial<Params>>
  • useFormattedNumber(__namedParameters?: Options): readonly [string, (input?: null | string | number) => void]
  • useStatus(): { form: FormContextProps; section: SectionContextProps }
  • Returns { form: FormContextProps; section: SectionContextProps }

    • form: FormContextProps
    • section: SectionContextProps
  • withFinalForm<InputValue, AdditionalProps, Element, FieldValue>(options?: WithFinalFormOptions<InputValue, FieldValue, any>): <Props>(WrappedComponent: ComponentType<Props>) => ForwardRefExoticComponent<PropsWithoutRef<ComponentProps> & RefAttributes<Element>>
  • Type parameters

    • InputValue: unknown

    • AdditionalProps: object = {}

    • Element: HTMLElement = HTMLDivElement

    • FieldValue = any

    Parameters

    Returns <Props>(WrappedComponent: ComponentType<Props>) => ForwardRefExoticComponent<PropsWithoutRef<ComponentProps> & RefAttributes<Element>>

      • <Props>(WrappedComponent: ComponentType<Props>): ForwardRefExoticComponent<PropsWithoutRef<ComponentProps> & RefAttributes<Element>>
      • Type parameters

        • Props: object

        Parameters

        • WrappedComponent: ComponentType<Props>

        Returns ForwardRefExoticComponent<PropsWithoutRef<ComponentProps> & RefAttributes<Element>>