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

Open
#10,114 11 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Mar 4, 2025.

sharepoint-developer-support type:bug-confirmed type:bug-suspected
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.

Image

Image

If you save from the button to perform the editProps action shown in the field, no error message will appear.

Image

Steps to reproduce
  1. 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"
                      }
                    }
                  ]
                }
              ]
            }
          }
        }
      ]
    }
    
  2. Open property edit screen from custom card

  3. Click the Save button

Expected behavior

No error message appears and can be saved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.