-
Notifications
You must be signed in to change notification settings - Fork 0
Form component
Vadym edited this page Aug 10, 2021
·
3 revisions
Form is a logical container to be used to aggreate all form-specific controls and create relations between them and create API to work with this logical container (validation, action executing etc).
As many child components have dynamic nature (can communicate with internal or external services) - form is also the main mediator of such communications and can configure communications channels properly, keep child components isolated and agnostic from channel specifics. An example of this specifics can be:
- use internal hard-coded values/enums to populate the specific dictionary
- use REST call to populate the collection
- ask dependent library for data for a specific component
The default behavior is to use REST calls with using dictionary name as a pre-configured path to access data when the requested content is not found in the form inside bounded static dictionaries:
{
name: 'formWithStaticDictionaries',
items: [...],
dictionaries: {
dic1: [{id:1, name: 'a'},{id:2, name: 'b'},{id:3, name: 'c'}],
dic2: [{id:1, name: 'd'},{id:2, name: 'e'},{id:3, name: 'f'}]
}
}