Home > @polyspec/crudui-generator-core > FormInstance
FormInstance class
One editable form instance over a shared template. All row operations are scoped to a collection path; no global string replacement touches siblings. Data, undo history and view state (collapsed rows) are separate; view state is never submitted.
Signature:
export declare class FormInstance
Constructors
|
Constructor |
Modifiers |
Description |
|---|---|---|
|
Create an instance with independent record data. |
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string |
The template's root description translated for the instance language; empty text when none. | |
|
() => FormSnapshot |
Return the current subscription snapshot. | ||
|
|
string | undefined |
Effective root prefix for submitted input names. | |
|
|
Interface text for the instance language. | ||
|
(listener: () => void) => (() => void) |
Subscribe to injection, editing, row operations and view changes. Returns an unsubscribe function. | ||
|
|
Shared immutable structure. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Insert a blank/defaulted row, or supplied row data, with one new identity. | ||
|
Copy current values and give every descendant repeated row a fresh key. | ||
|
Detached submission data, retaining keyed nested collections. | ||
|
Read a detached value relative to the data root. | ||
|
Change order without changing row keys, values or descendant identities. | ||
|
Reapply the most recently undone data change. | ||
|
Apply a saved seq key to exactly one row. Descendant paths and view state follow. | ||
|
Remove one row unless the minimum count would be violated. | ||
|
Expand or collapse every collapsible row. | ||
|
Replace the record after an asynchronous load or save; history and view state restart. | ||
|
Update one data path and reevaluate affected form presentation. | ||
|
Expand a collapsed row or collapse an expanded one. | ||
|
Restore the record before the last data change. |