Created
April 28, 2024 09:56
-
-
Save tecchan1107/28d3b74d25be098c4ad4f43df364122b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", | |
"elmType": "div", | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"display": "flex", | |
"flex-direction": "column", | |
"margin-top": "2px", | |
"margin-bottom": "2px" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"display": "flex", | |
"flex-wrap": "wrap" | |
}, | |
"children": [ | |
{ | |
"elmType": "div", | |
"forEach": "_person in @currentField", | |
"style": { | |
"display": "=if(@currentField,'flex','none')", | |
"flex-direction": "row", | |
"align-items": "center", | |
"white-space": "nowrap", | |
"border-radius": "14px", | |
"margin": "4px" | |
}, | |
"attributes": { | |
"class": "=if([$_person.email]==@me,'ms-bgColor-themeLighter ms-fontColor-themeDarker','ms-bgColor-neutralLight ms-fontColor-neutralPrimary')" | |
}, | |
"defaultHoverField": "[$_person]", | |
"children": [ | |
{ | |
"elmType": "img", | |
"style": { | |
"width": "28px", | |
"height": "28px", | |
"border-radius": "50%" | |
}, | |
"attributes": { | |
"src": "=getUserImage([$_person.email],'small')" | |
} | |
}, | |
{ | |
"elmType": "div", | |
"txtContent": "[$_person.title]", | |
"style": { | |
"padding-left": "6px", | |
"padding-right": "10px" | |
}, | |
"attributes": { | |
"class": "ms-fontSize-s" | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment