The
react-declarative
is not just a form builder. This one is a huge framework with dashboard adaptive cards builder, crud-based List component and more.
Make changes by analogy sequentially in the following files
model/IField.ts - Add new field properties
config/createField.tsx - File registration (during execution)
config/initialValue.ts - Default value for the field
config/isStatefull.ts - Mark If you're creating a field, not a layout
model/FieldType.ts - Adding a field entry to enum
model/TypedField.ts - Strong typing declaration for the userspace
components/One/slots/CheckBoxSlot - Duplicate this folder and update naming
components/One/components/ISlotFactoryContext.ts - Update slot context interface
components/One/components/SlotFactory/SlotContext.ts - Update slots context value
In order of composition during execution
IField - Field retrieved from the userspace
IEntity - A field connected to the instance of the One
component
IManaged - A wrapper over the change
callback and the current object
, designed to prevent recursive repaints and provide a convenient api for a field developer
IMPORTANT: TypedField only checks at the time of static type checking. The internal implementation of the One component performs exactly the composition of objects without any typecheck
Also The Field Type.Init allows defaultValue
the value for Field Type.Component fields if it emits several properties in onChange object. The FieldType.Phony keeps the field without any defaultValue
so Object.keys(data)
will not see It