This is a list field customizer developed using SharePoint Framework extension. It will display the attachment related information for a list item. It focus on the default attachment field which will display only an icon, but this customizer will display the info of the attachments list which will help the business users to access the files easily.
- Display Total count of attachments mapped to an item.
- Display List of Attachments with link to the files.
- Display No Attachments message with an icon for the item without the attachments
- showTotal: This property will allow the users to view the count of attachments mapped to the list item.
- showAttachmentList: This property will allow the users to view the full list of attachments to the list item.
- showNoAttachmentMsg: This property will allow the users to enable or disable the ‘No Attachments’ message.
- Used PnPJS library for fetching the attachments mapped to the listitem.
- For each item, a transaction call is made to fetch the attachments.
- Please be cautious while using it on large lists.
The above web-part is shared with the community and is of free to use. Please click the below link to download the code and have fun.
3 thoughts on “SPFx – Field Attachment Info”
how can I activate it for list. I uploaded the sppkg file in my app catalogue and added it to my site. But I can’t see an effect in my list. What i do wrong?
You can activate the control using pnp powershell or cli.
Please try to use the below pnp powershell commands
$list = Get-PnPList -Identity $listTitle
$fld = Get-PnPField -List $list -Identity $fieldTitle
$fld.ClientSideComponentId = “0407eb29-728c-47c3-9f9b-bb1d2e04c4cc”