@almadar/ui 4.3.0 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -155,8 +155,13 @@ export interface FormProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
|
|
|
155
155
|
className?: string;
|
|
156
156
|
/** Entity type name or schema object. When OrbitalEntity, fields are auto-derived if not provided. */
|
|
157
157
|
entity?: string | OrbitalEntity | readonly Record<string, unknown>[];
|
|
158
|
-
/**
|
|
159
|
-
|
|
158
|
+
/**
|
|
159
|
+
* Form mode — 'create' for new records, 'edit' for updating existing.
|
|
160
|
+
* Accepts `string` so schema-driven callers (whose `config.mode` is typed
|
|
161
|
+
* as `string` per the trait's declared config block) compile cleanly. The
|
|
162
|
+
* runtime treats anything other than 'edit' as 'create'.
|
|
163
|
+
*/
|
|
164
|
+
mode?: "create" | "edit" | string;
|
|
160
165
|
/** Fields definition (schema format) - accepts readonly for generated const arrays */
|
|
161
166
|
fields: readonly Readonly<SchemaField>[];
|
|
162
167
|
/** Initial form data */
|