Open
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
not applicable
Developer environment
None
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
- Chrome 135
Describe the bug / error
Group headers are broken for new modern ui in document libraries if a json view with headerFormatter
(groupProps
) is used for person columns (easiest way to reproduce is to set the grouping for a person field to expanded in the view settings).
Screenshot of broken group header:
Steps to reproduce
- Create a document library
- Add a files to it
- Add custom json view (see view formatting below)
- Goto view setting and enable grouping for creator (or any other person field) with expanded group (see screenshot below)
- Reload page and see broken group header
[object Object]
instead of person name
View formatting:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"groupProps": {
"headerFormatter": {
"elmType": "div",
"txtContent": "@group.fieldData.displayValue"
}
},
"rowFormatter": {
"elmType": "div",
"style": {
"height": "100%"
},
"txtContent": "[$FileLeafRef]"
}
}
Expected behavior
Name of person (value of @group.fieldData.displayValue
) should be shown as Group header instead of [object Object]
.