Skip to main content

getLibraryAttachments

@spartanfx/react v1.2.2


@spartanfx/react / spfx / getLibraryAttachments

Function: getLibraryAttachments()

function getLibraryAttachments(formContext, section?): InlineItem<
| ILibraryAttachmentListItem
| INewLibraryAttachment>[];

Retrieves the current list of attachments (excluding deleted ones) from the form state.

Parameters​

formContext​

IListFormContext

The current list form context.

section?​

string

Optional section to scope attachment filtering.

Returns​

InlineItem< | ILibraryAttachmentListItem | INewLibraryAttachment>[]

An array of inline attachment items.

Example​

Minimal usage

getLibraryAttachments(formContext, section?)