I'm trying to format the way my grouping appears in Sharepoint Online (remove column heading in two-layer grouping). It currently displays this way:
I have the following JSON:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
"groupProps": {
"headerFormatter": {
"elmType": "div",
"style": {
"padding-left": "12px",
"font-size": "16px",
"font-weight": "400",
"cursor": "pointer",
"outline": "0px",
"white-space": "nowrap",
"text-overflow": "ellipsis"
},
"children": [
{
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding": "5px 5px 5px 5px"
},
"txtContent": "@group.fieldData.displayValue.lookupValue"
}
]
},
{
"elmType": "div",
"children": [
{
"elmType": "div",
"style": {
"display": "flex",
"flex-direction": "row",
"justify-content": "center"
},
"children": [
{
"elmType": "div",
"txtContent": "=' (' + @group.count + ')'"
}
]
}
]
}
]
}
}
}
When I apply it, it removes my headings appropriately but it also removes the date at 2nd level grouping. Would anyone be able to help me to fix this? Ideally, it would also group/display dates as MMM-YYYY (without the day).
Many thanks!