SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

List Formatting - Issue clicking in Board View using customCardProps "click" opens Edit item Form #9884

Closed aaclage closed 3 weeks ago

aaclage commented 3 months ago

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

Additional environment details

Describe the bug / error

Dear Mr. @shagra-ms, @tpodugu-ms, @arkogupta, I would like to report the following issue and inconsistent behavior Board View with declarative action customCardProps "Click":

When using the declarative customCardProps "Click" in Board View, the Edit Form appear with combination of customCardProps.

ErrorListFormattingClickBoard

Steps to reproduce

  1. Add Board View
  2. Add Title and description Column
  3. Include following View Formatting for Card and click on button to see behavior.
    {
    "$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": "button",
        "style": {
          "margin": "10px",
          "padding": "20px"
        },
        "txtContent": "Click here",
        "customCardProps": {
          "openOnEvent": "click",
          "formatter": {
            "elmType": "div",
            "style": {
              "padding": "20px"
            },
            "children": [
              {
                "elmType": "div",
                "style": {
                  "padding": "10px"
                },
                "children": [
                  {
                    "elmType": "div",
                    "style": {
                      "padding": "10px",
                      "font-size": "20px",
                      "border": "1px solid black",
                      "cursor": "pointer"
                    },
                    "attributes": {
                      "iconName": "WavingHand"
                    },
                    "txtContent": "Click me to open 2 dialog",
                    "customCardProps": {
                      "openOnEvent": "click",
                      "formatter": {
                        "elmType": "div",
                        "children": [
                          {
                            "elmType": "div",
                            "style": {
                              "padding": "10px",
                              "font-size": "20px",
                              "border": "1px solid black",
                              "cursor": "pointer"
                            },
                            "attributes": {
                              "iconName": "WavingHand"
                            },
                            "txtContent": "Click me again",
                            "customRowAction": {
                              "action": "setValue",
                              "actionInput": {
                                "Title": "=Number(@now)"
                              }
                            }
                          }
                        ]
                      }
                    }
                  },
                  {
                    "elmType": "div",
                    "style": {
                      "padding": "10px",
                      "font-size": "15px",
                      "font-weight": "bold"
                    },
                    "txtContent": "Title:"
                  },
                  {
                    "elmType": "div",
                    "style": {
                      "padding": "10px"
                    },
                    "txtContent": "[$Title]"
                  },
                  {
                    "elmType": "div",
                    "style": {
                      "padding": "10px",
                      "font-size": "15px",
                      "font-weight": "bold"
                    },
                    "txtContent": "Description:"
                  },
                  {
                    "elmType": "div",
                    "style": {
                      "padding": "10px"
                    },
                    "txtContent": "[$Description]",
                    "inlineEditField": "[$Description]"
                  }
                ]
              }
            ]
          }
        }
      }
    ]
    }
    }

Expected behavior

When using the declarative customCardProps "Click" in Board View, the Edit Form appear with combination of customCardProps.

aaclage commented 3 months ago

@tpodugu-ms, @arkogupta, for your consideration.

Fedes365 commented 3 months ago

@aaclage bug confirmed in my tenant too.

aaclage commented 2 months ago

Dear Mr. @tpodugu-ms, @arkogupta, @jgupta-msft

Any update on this topic?

jgupta-msft commented 2 months ago

Thanks for bringing to attention. Actively investigating all these issues reported on GitHub, expect update soon.

arkogupta commented 1 month ago

@aaclage This has been fixed. Fix should reach your tenant by the week of 14th October.

aaclage commented 1 month ago

@arkogupta I will wait/test and then close after confirmation.

Thank you for the update and support.

aaclage commented 3 weeks ago

@arkogupta Test and is working as expected.

Thank you for your support.