SharePoint / SharePoint/sp-dev-docs
List Formatting: When saving from the `editProps` action inside a custom card in the document library, an error message appears
@Ashlesha-MSFT is already working on this.
Since Mar 4, 2025.
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
Declarative list formatting
Developer environment
None
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
No response
Describe the bug / error
In the document library, a button executing the editProps action is placed inside a custom card. When editing and saving properties using this button, the error message "Cannot load a resource from a ResourceScope that has been disposed." appears. However, the values seem to be saved correctly.
If you save from the button to perform the editProps action shown in the field, no error message will appear.
Steps to reproduce
-
Apply the following JSON to any column in the document library
sample code
{ "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "children": [ { "elmType": "div", "txtContent": "Open Custom Card", "style": { "padding": "5px 10px", "cursor": "pointer" }, "attributes": { "class": "ms-bgColor-themePrimary ms-fontColor-white" }, "customCardProps": { "openOnEvent": "click", "isBeakVisible": true, "formatter": { "elmType": "div", "style": { "padding": "20px" }, "children": [ { "elmType": "div", "children": [ { "elmType": "button", "txtContent": "Edit", "customRowAction": { "action": "editProps" } } ] } ] } } } ] } -
Open property edit screen from custom card
-
Click the Save button
Expected behavior
No error message appears and can be saved.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.