IListFormConfig
@spartanfx/react / spfx / IListFormConfig
Interface: IListFormConfig
Configuration object for initializing the ListForm context.
This configuration controls how the form is initialized, including list metadata, SPFx context, behavior flags, and lifecycle hooks.
Properties
| Property | Type | Description |
|---|---|---|
disabled? | boolean | If true, disables all controls in the form. The context's disabled flag will reflect this. |
itemId? | number | ID of the SharePoint list item to load into the form. Optional render the form in "new item" mode if null or undefined. |
listName | string | The display name of the SharePoint list. |
onInit? | (listFormContext) => void | Promise<void> | Lifecycle hook called once before the form is shown. Use this to pre-fill form state or run initialization logic. If a Promise is returned, rendering will be delayed until the Promise resolves. |
readonly? | boolean | If true, renders the form in readonly mode (visually editable, but no actions are allowed). Unlike disabled, fields are not grayed out and can still be visually interacted with. |
sp | SPFI | PnPjs SPFI instance used for SharePoint REST API operations. |
translate? | (text) => string | Optional translation function for localizing UI text strings. If not provided, raw text values will be used. |
webPartContext | WebPartContext | SPFx WebPart context, typically passed from the WebPart class. |