Skip to components
DEVELOPER REFERENCE · v4.0.0

SharedResourcePicker API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

SharedResourcePicker13 props1 callbacks0 methods

Props13

SharedResourcePicker props
NameTypeDescription
resourcesRequired
readonly Resource[]Inspect type
Resources available for selection, with IDs and display metadata.
selectedResourceIdsRequired
readonly Id[]Inspect type
IDs of the currently selected resources.
textRequired
ResourcePickerTextInspect type
Display text or localized text overrides; expand the type when this prop accepts an object.
classNamesOptional
ResourcePickerClassNames | undefinedInspect type
CSS class overrides for named internal parts; expand the type for the supported part names.
disabledOptionalboolean | undefinedDisables user interaction with the control.
readOnlyOptionalboolean | undefinedShows resource details without checkbox controls or selection changes.
presentationOptional"inline" | "dropdown" | undefinedKeeps the full list visible or presents it as a compact combobox.
multipleOptionalboolean | undefinedAllows more than one selected resource. Defaults to true.
preserveOrderOptionalboolean | undefinedKeeps resources in caller-provided order instead of sorting by name.
unassignedOptional
ResourcePickerUnassignedOption | undefinedInspect type
Optional choice for representing an unassigned resource.
resourceDataAttributeOptionalstring | undefinedData attribute used to identify resource items in the rendered list.
isResourceDisabledOptional
((resource: Resource) => boolean) | undefinedInspect type
Return true for resources that cannot be selected.
getAvatarColorOptional
((resource: Resource) => string | undefined) | undefinedInspect type
Returns the avatar accent color for a resource.

Events and callbacks1

SharedResourcePicker events and callbacks
NameTypeDescription
onChangeRequired
(resourceIds: readonly Id[]) => voidInspect type
Receives the new value when the user changes the control. Update the corresponding value prop for controlled use.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.