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

List Formatting - View Formatting: About whitespace displayed below the row

Open tecchan1107 opened this issue 1 year ago • 4 comments

What type of issue is this?

Question

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

Declarative list formatting

Target SharePoint environment

SharePoint Online

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

No response

Issue description

Whenever I format a view, there is now a whitespace below the row. I don't believe there was ever this whitespace before. Is this a specification change? Or is it a bug?

image

image

tecchan1107 avatar Oct 15 '24 03:10 tecchan1107

@tecchan1107 Thank you for reporting this. Could you please share the formatter JSON?

tpodugu-ms avatar Oct 16 '24 18:10 tpodugu-ms

Thanks for the reply @tpodugu-ms !

Could you please share the formatter JSON?

When rowFormatter is used, there is always whitespace below the row. The following is a sample JSON.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "hideColumnHeader": true,
  "hideSelection": true,
  "rowFormatter": {
    "elmType": "div",
    "txtContent": "[$ID]",
    "style": {
      "width": "300px",
      "height": "50px",
      "background-color": "pink"
    }
  }
}

image

tecchan1107 avatar Oct 17 '24 09:10 tecchan1107

I believe that previously, if hideSelection was set to true and hideColumnHeader was set to true, this whitespace would not have been displayed.

tecchan1107 avatar Oct 17 '24 09:10 tecchan1107

@tecchan1107 Thank you for the inputs. Issue is fixed and will be available in prod in 2-3 weeks.

tpodugu-ms avatar Oct 17 '24 18:10 tpodugu-ms

I just checked and it was fixed! Thanks for the fix @tpodugu-ms !

image

tecchan1107 avatar Nov 05 '24 08:11 tecchan1107