Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StepDefinition<DBSchema, StoreName>

A step in a multipage form.

This represents a single step in the flow of the multipage form.

Type parameters

Hierarchy

  • StepDefinition

Index

Properties

componentWrappers

componentWrappers: ComponentWrapper<DBSchema, StoreName, ComponentValue<DBSchema, StoreName>>[]

An ordered array of wrapped components to include in this step.

Create ComponentWrappers with ComponentWrapper.wrapStatic and ComponentWrapper.wrapDynamic.

Optional nextSlug

nextSlug: ((stepValues: {}) => string) | string | null

The slug of the StepDefinition that follows this one or a function that returns it based on the current state of the step's values.

slug

slug: string

The slug to uniquely identify the step.

This is referenced by OrchestratorProps.initialSlug and StepDefinition.nextSlug.

Optional submit

submit: ((nextSlug?: undefined | string) => SubmitType) | null

An optional function that returns a submit button or a similar component. This should be used for the main call to action, and will persist the data and navigate to the next step when activated.

The returned component must implement SubmitProps to function correctly.

Generated using TypeDoc