MagicForm | <magic-form>

captures the submit event of the nested form and sends it to MagicFormProvider

Examples

<MagicForm>
  <form action="user">
    <input type="text" name="name" />
    <input type="text" name="email" />
    <button>Create user</button>
  </form>
</MagicForm>

Events

Type
Description
Config

"ChangeState"

Dispatched when status changes from provider

{bubbles: false, composed: false}

Properties

Property
Description
Type

state

Read only, Current status submission of the form

Object

action

Defines the action to dispatch, if not defined it can be inherited from the

tag

String

Property.state

interface MagicFormActionStatus{
    result?:any,
    timestamp?: number,
    status: "pending" | "fulfilled" | "rejected"
}

Last updated