Skip to main content
Version: 1.1.0

IListFormFieldCascadingLookupProps

@spartanfx/react v1.1.0


@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

PropertyTypeDescriptionInherited from
allowedValues?string[]If provided, restricts lookup options to items containing these allowed string values.-
canSelectAll?booleanEnables a "Select All" checkbox in multi-select mode.-
cascadingFieldInternalName?stringInternal name of the field this lookup cascades from. Used to filter lookup results.-
controlProps?anyProps passed directly to the underlying field control.IListFormFieldRendererProps.controlProps
disabled?booleanWhether the field is disabled. Overrides form-level settings.IListFormFieldRendererProps.disabled
fieldIFieldInfoThe SharePoint field definition object.IListFormFieldRendererProps.field
formStateKeystringThe key used in the form state object, matching the field's internal name.IListFormFieldRendererProps.formStateKey
inlineLabel?booleanDisplays the label inline with the dropdown.-
isOptionDisabled?(option) => booleanPredicate 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?stringCustom width to apply to the label, useful when inlineLabel is true.-
listFormContextIListFormContextThe full list form context for accessing state, validation, etc.IListFormFieldRendererProps.listFormContext
lookupFieldInternalName?stringInternal name of the lookup field to use for cascading filtering (e.g., the lookup target's field).-
maxOptions?numberMaximum number of options to show without search; a notice is shown when limit is exceeded.-
maxSelection?numberMaximum number of items that can be selected in multi-select mode. If not set, allows unlimited selection.-
onChange?(newValue, oldValue?) => voidOptional callback triggered when the field value changes.IListFormFieldRendererProps.onChange
options?any[]Optional custom options to be used instead of querying the list.-
optionTextField?stringField 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?booleanIf true, renders the field in readonly mode without user interaction.IListFormFieldRendererProps.readonly
renderDisabledOptions?booleanWhen true, options flagged by isOptionDisabled are rendered in the dropdown with disabled styling. Default: false (filter them out).-
required?booleanWhether 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?booleanEnables a search box above the dropdown options for filtering.-