IListFormFieldCascadingLookupProps
@spartanfx/react / spfx / IListFormFieldCascadingLookupProps
Interface: IListFormFieldCascadingLookupProps
Props for the ListFormCascadingLookup component.
This component renders a dynamic, optionally searchable, cascading lookup field in a SharePoint list form, supporting multi-select, filtering, and value constraints.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
allowedValues? | string[] | If provided, restricts lookup options to items containing these allowed string values. | - |
canSelectAll? | boolean | Enables a "Select All" checkbox in multi-select mode. | - |
cascadingFieldInternalName? | string | Internal name of the field this lookup cascades from. Used to filter lookup results. | - |
controlProps? | any | Props passed directly to the underlying field control. | IListFormFieldRendererProps.controlProps |
disabled? | boolean | Whether the field is disabled. Overrides form-level settings. | IListFormFieldRendererProps.disabled |
field | IFieldInfo | The SharePoint field definition object. | IListFormFieldRendererProps.field |
formStateKey | string | The key used in the form state object, matching the field's internal name. | IListFormFieldRendererProps.formStateKey |
inlineLabel? | boolean | Displays the label inline with the dropdown. | - |
isOptionDisabled? | (option) => boolean | Predicate to mark options as disabled, receives the raw row data. Disabled options behavior depends on renderDisabledOptions: - false (default): disabled options are filtered out, EXCEPT currently selected ones (kept so the field value stays visible). - true: disabled options are shown with disabled styling, EXCEPT currently selected ones (kept enabled so they can be deselected). | - |
labelWidth? | string | Custom width to apply to the label, useful when inlineLabel is true. | - |
listFormContext | IListFormContext | The full list form context for accessing state, validation, etc. | IListFormFieldRendererProps.listFormContext |
lookupFieldInternalName? | string | Internal name of the lookup field to use for cascading filtering (e.g., the lookup target's field). | - |
maxOptions? | number | Maximum number of options to show without search; a notice is shown when limit is exceeded. | - |
maxSelection? | number | Maximum number of items that can be selected in multi-select mode. If not set, allows unlimited selection. | - |
onChange? | (newValue, oldValue?) => void | Optional callback triggered when the field value changes. | IListFormFieldRendererProps.onChange |
options? | any[] | Optional custom options to be used instead of querying the list. | - |
optionTextField? | string | Field name to use for option text display, instead of the SharePoint field's LookupField. Useful when LookupField may return null (e.g. calculated field returning null for inactive items). When set and different from LookupField, it is added to the CAML View automatically. | - |
readonly? | boolean | If true, renders the field in readonly mode without user interaction. | IListFormFieldRendererProps.readonly |
renderDisabledOptions? | boolean | When true, options flagged by isOptionDisabled are rendered in the dropdown with disabled styling. Default: false (filter them out). | - |
required? | boolean | Whether the field is required. | IListFormFieldRendererProps.required |
restrictFields? | string[] | Restrict the CAML View fields returned by SharePoint to this list (plus the essentials: Id, the SP LookupField, and optionTextField if set — auto-merged so the component cannot break itself). Useful to access extra row data in isOptionDisabled or downstream consumers. When not provided, no ViewFields are passed, so SharePoint returns all properties of the item. | - |
translate? | (text) => string | - | - |
withSearch? | boolean | Enables a search box above the dropdown options for filtering. | - |