We would like to adjust the height of each card dynamically to the content of each card (see screenshot below). I already tried with "height": "auto", but the cards overlaps after this or half of the content is cut if you use group by.
To hide the columns in the gallery I used.
"style": {
"display": "=if([$Description] == '', 'none', 'block')"
}
The gallery view:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/tile-formatting.schema.json",
"height": 600,
"width": 254,
"hideSelection": false,
"fillHorizontally": true,
"formatter": {
"elmType": "div",
"attributes": {
"class": "sp-card-container"
},
"children": [
{
"elmType": "div",
"attributes": {
"class": "sp-card-defaultClickButton"
},
"customRowAction": {
"action": "defaultClick"
}
},
{
"elmType": "div",
"attributes": {
"class": "ms-bgColor-white sp-css-borderColor-neutralLight sp-card-borderHighlight sp-card-subContainer"
},
"children": [