Form / foldkit-mixins-form

FormInput

interface · packages/mixins-form/src/index.ts:225

interface FormInput<
  Model,
  Key extends string = string,
  ControlKey extends string = never,
  PickerKey extends string = Key,
> extends FormViewInputs<Key, ControlKey, PickerKey> {
  readonly model: Model
  readonly errors: ReadonlyArray<string>
  readonly canSubmit: boolean
  readonly submitting?: boolean | undefined
}

What the form's own Style and Behavior attachments may read.

Members

FormInput.model

property · packages/mixins-form/src/index.ts:231

readonly model: Model

FormInput.errors

property · packages/mixins-form/src/index.ts:232

readonly errors: ReadonlyArray<string>

FormInput.canSubmit

property · packages/mixins-form/src/index.ts:239

readonly canSubmit: boolean

Whether the submit button is drawn without aria-disabled. It only marks the button: a press or Enter still reaches update, which decides from the Model. Whether a submit made while a check runs is refused is the form's submitWaits option, not this.

FormInput.submitting

property · packages/mixins-form/src/index.ts:244

readonly submitting?: boolean | undefined

Whether the form is submitting: a submit waits for a check, or the application's work with the value is in flight. FormView.submodel reads both.