Skip to content

IConfigurableFormCollection

github-actions[bot] edited this page Dec 3, 2024 · 3 revisions
API / IConfigurableFormCollection<TSection, TValidationError> interface

Represents collection of form sections that can be configured. This is useful for cases like having a list of editable items and neeeding to add validation for each based on the state of an entity or the form itself.

interface IConfigurableFormCollection<TSection extends Form<TValidationError>, TValidationError = string>

Source reference: src/forms/IConfigurableFormCollection.ts:18.

Generic Parameters

  • TSection - The concrete type of the form section.

    Type constraints: Form<TValidationError>.

  • TValidationError - The concrete type for representing validation errors (strings, enums, numbers etc.).

    Default value: string.

Methods

  • clearItemSetups - Clears all setup callbacks and resets all existing form sections.
  • withItemSetup - Configures the provided setupCallback and applies it on all existing form sections within the collection
  • withoutItemSetup - Removes the provided setupCallback and no longer applies it to form sections that are added, all existing

Implementations

Clone this wiki locally