Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "defaultClick"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontSize-m"
},
"style": {
"border": "none",
"background-color": "transparent"
},
"children": [
{
"elmType": "span",
"style": {
"display": "=if([$_CommentCount] == '' , 'none' , 'block')"
},
"attributes": {
"iconName": "Comment"
}
},
{
"elmType": "span",
"txtContent": "=if([$_CommentCount] == '' , '0' , [$_CommentCount])",
"style": {
"margin-left": "10px"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment