Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

wesib/forms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 16, 2023
4806e4b · Sep 16, 2023
Apr 29, 2023
Sep 29, 2022
May 31, 2021
Sep 3, 2022
Jan 27, 2023
Jan 27, 2023
Jan 27, 2023
Sep 3, 2022
Apr 30, 2022
Jan 27, 2023
Apr 30, 2022
Jan 27, 2023
Sep 16, 2023
Jan 27, 2023
Jan 27, 2023

Repository files navigation

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.