I'm trying to use this MS documentation to create a tile view for my list items. About halfway down it shows how to use tileProps
to enable the Tile view for the drop down and create tiles.
It works and creates a tile view where each list item is represented by a tile and the tiles flow as many fit in a line as can fit before breaking to a new line. But depending upon the screen/column size there can be an awkward empty space at the right of each "row" before it is long enough to accommodate the next item. Note the big white space off to the right side.
I'd like to let my cards vary in width a little bit to either fix 3 on that line or have the 2 that are there expand. In my example the json starts off like this:
{ "schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", "tileProps": { "height": "250", "width": "350", "hideSelection": true, "formatter": { ...
The width
property here sets flex:0 0 350;max-width:350px;
as an element style on each of the cards/flex items. There doesn't seem to be any ability to change that.
If I leave out the width
property or change that to auto or some value with units, it just renders with a default of 254px.
I'm not really good with flex, but I think I need to be able to change it to something like flex:1 1 auto;min-width:250px;max-width:400px;
or whatever values would work.
Does anybody have any ideas for how to get truly responsive tiles using json formatting?