Forum Discussion

solus_optimus's avatar
solus_optimus
Copper Contributor
Mar 05, 2019

Use Format View on List WebPart to Create 'Tile View'

Greetings,

    The json file at the following URL allows viewing a list in Tile View.

https://github.com/SharePoint/sp-dev-list-formatting/blob/master/view-samples/generic-tile-format/tile-view.json

The tile view looks fine when applying the JSON via "Format View".  However, when saving and going back to the hosting page the tiles appear staggered.

The images below demonstrate the problem.

 

After application of JSON via "Format View"   Webpart as seen in host site with "Modern Theme"

After running Dev Tools from the browser, examining "ms-list-cell" class on each of the two pages reveals that "min-height" is set to 0 when editing the list, but is set to 38px on the Modern Themed site page.  Removing the min-height style corrects the staggered appearance. 

Questions:

Has anyone seen this before?

Is there a work-around?

This is happeneing on Office 365, sharepoint online.

 

Thanks in adv. 

  • Yes, I have seen the same problem when I tried it, but had to time to investigate as I was just quickly trying the code.
    This could be simply down to CSS changes since the sample was created. Check the issues list on HitHub and open a new issue if you can't find a related one. If you manage to fix it, please contribute back with the fix :)

Resources