@wesib/forms
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Wesib: Forms

NPM Build Status Code Quality Coverage GitHub Project API Documentation

This module adapts an Input Aspects library for the use with components.

A Form instance represents some form control. While a Field instance represents an input field control.

When @SharedForm() decorates a container component property with Form value, this makes that form shared.

When @SharedField() decorates a nested component property with Field value, this field is added to the form shared by closest container, and also makes this field shared.

An @OnSubmit()-decorated method is called when the form shared by the component (or its closest container) submitted.

A FormPreset instance provided for component context can be used to modify Form and Field aspects.

Package Sidebar

Install

npm i @wesib/forms

Weekly Downloads

1

Version

2.0.2

License

MIT

Unpacked Size

120 kB

Total Files

7

Last publish

Collaborators

  • lorus