sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Sync issue Board View card doesnt update after "setValue" in "customCardProps"

Open aaclage opened this issue 1 year ago • 2 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

Declarative list formatting

Developer environment

Windows

What browser(s) / client(s) have you tested

  • [ ] 💥 Internet Explorer
  • [X] 💥 Microsoft Edge
  • [X] 💥 Google Chrome
  • [ ] 💥 FireFox
  • [ ] 💥 Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • browser version
  • SPFx version
  • Node.js version
  • etc

Describe the bug / error

This issue appears in List View "Board" with formatted provide below.

Whe include custom formatting that uses "customCardProps" in card to update Field, the card where field is display doesn't sync/update with the new content.

ErrorSync

Json Format you can use to reproduce the error.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/board-formatting.schema.json",
  "hideSelection": false,
  "formatter": {
    "elmType": "div",
    "attributes": {
      "class": "sp-card-container sp-card-container-noPadding"
    },
    "children": [
      {
        "elmType": "div",
        "attributes": {
          "class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer sp-card-subContainer-borderRadius"
        },
        "children": [
          {
            "elmType": "div",
            "children": [
              {
                "elmType": "div",
                "attributes": {
                  "iconName": "more"
                },
                "customCardProps": {
                  "openOnEvent": "click",
                  "formatter": {
                    "elmType": "div",
                    "children": [
                      {
                        "elmType": "div",
                        "style": {
                          "padding": "10px",
                          "cursor": "pointer"
                        },
                        "txtContent": "Click Me to update Title",
                        "customRowAction": {
                          "action": "setValue",
                          "actionInput": {
                            "Title": "='Value1 to '+ if(Number(@now)%7==0,1,if(Number(@now)%7==1,2,if(Number(@now)%7==2,3,if(Number(@now)%7==3,4,if(Number(@now)%7==4,5,6)))) + ' set'"
                          }
                        }
                      }
                    ]
                  }
                }
              },
              {
                "elmType": "p",
                "attributes": {
                  "class": "ms-fontColor-neutralSecondary sp-card-label sp-card-boldText"
                },
                "txtContent": "[!Title.DisplayName]"
              },
              {
                "elmType": "p",
                "attributes": {
                  "title": "[$Title]",
                  "class": "ms-fontColor-neutralPrimary sp-card-content sp-card-highlightedContent",
                  "role": "heading",
                  "aria-level": "3"
                },
                "txtContent": "=if ([$Title] == '', '–', [$Title])"
              }
            ],
            "attributes": {
              "class": "sp-card-displayColumnContainer"
            }
          }
        ]
      }
    ]
  }
}

Steps to reproduce

  1. Create a Custom List 2.Create a new "Board" View
  2. Access to "Format current view"
  3. Include the sample Json provided
  4. Click on the 3 dots and hover appears
  5. click on text "Click Me to update Title"
  6. Title should be updated and should appear in card the new content.

Expected behavior

When updated field in "customCardProps", should reflec in the card. Looks to be a sync issue.

aaclage avatar Aug 19 '22 07:08 aaclage

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Aug 19 '22 07:08 ghost

Hi @shagra-ms, I would like to address you this new issue regarding declarative JSON Microsoft List.

aaclage avatar Aug 19 '22 07:08 aaclage