Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Formatting: When a view using absolute is displayed in the list web part, the list items do not appear #10046

Open
2 of 9 tasks
tecchan1107 opened this issue Dec 11, 2024 · 1 comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@tecchan1107
Copy link
Contributor

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
  • 💥 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

The view was formatted by setting position to absolute to display items with absolute positioning. This works fine on the list screen.

image

However, when the same view is displayed in a list web part on the page, the items do not appear. Previously, they were displayed without any issues.

image

Is this a bug? Or is it no longer supported due to specification changes?

Steps to reproduce

  1. Create a view and apply the following JSON

    Sample Code
    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
      "hideColumnHeader": true,
      "hideSelection": true,
      "rowFormatter": {
        "elmType": "div",
        "style": {
          "position": "absolute",
          "left": "= @rowIndex * 300 + 'px'",
          "width": "300px",
          "height": "200px"
        },
        "children": [
          {
            "elmType": "div",
            "txtContent": "[$ID]",
            "style": {
              "display": "flex",
              "align-items": "center",
              "justify-content": "center",
              "width": "90%",
              "height": "90%",
              "font-size": "20px"
            },
            "attributes": {
              "class": "ms-bgColor-themeLighter"
            }
          }
        ]
      }
    }
  2. Place the List Web Part on the page and display the view created in 1.

Expected behavior

List items are displayed.

@tecchan1107 tecchan1107 added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Dec 11, 2024
@tpodugu-ms
Copy link

@tecchan1107 Thanks for reporting. I will check this and update.

@VesaJuvonen VesaJuvonen added the Needs: Triage 🔍 Awaiting categorization and initial review. label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

3 participants