SharePoint / sp-dev-docs

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

List Formatting - Issue using inline edit and setValue in "customCardProps" #9614

Closed aaclage closed 3 weeks ago

aaclage commented 4 months ago

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

Additional environment details

Browser

Describe the bug / error

Dear Mr. @shagra-ms, I would like to report the following issue and inconsistent behavior when using some actions in List View but not when using WebPart List in SharePoint Page:

ErrorListFormatting

Steps to reproduce

  1. Create support List
  2. Add Columns "Title" and "Description"
  3. Create List Include following List Formatting on View:
    {
    "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
    "hideColumnHeader": true,
    "hideSelection": true,
    "rowFormatter": {
    "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]"
              }
            ]
          }
        ]
      }
    }
    }
    }

    4- Create SharePoint Page 5- Add WebPart List with new View 6- Test options on support gif

Expected behavior

The gif below provide current behavior when List is View mode and List is included in SharePoint Page but behavior is not the same as shown in image bellow. It's expected that same functionalities should be able to work on both sides. ErrorListFormatting

shagra-ms commented 3 months ago

@aaclage we are currently looking into this.

aaclage commented 2 months ago

Dear @shagra-ms @arkogupta,

Thank you for the update, here my feedback on current status:

1- inlineEditField was fixed 2- setValue in customCardProps was not fixed

Hope second point can also be fixed, again thank you for your support. A L

aaclage commented 3 weeks ago

Dear Mr. @tpodugu-ms, @shagra-ms, @arkogupta,

Report issue 2- setValue in customCardProps

Tested capability to update on modal dialog based on sample and is working now.

I will close ticket.

Thank you for your support, AL