Elements in a list are not showing after applying custom formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-871974%22%20slang%3D%22en-US%22%3EElements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-871974%22%20slang%3D%22en-US%22%3E%3CP%3EHello%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20a%20SharePoint%20list%20where%20the%20items%20in%20the%20list%20are%20displayed%20to%20users%20using%20custom%20formatting%20defined%20using%20a%20json-file.%20The%20items%20that%20are%20being%20displayed%20are%20being%20displayed%20correctly%2C%20however%2C%20only%20a%20very%20small%20subset%20of%20the%20items%20are%20shown%20(10%20when%20the%20list%20contains%20~300%20items).%20The%20view%20is%20also%20set%20to%20display%20~60%20elements%20pr%20page.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20are%20some%20possible%20issues%3F%20I%20closely%20recreated%20the%20list%20in%20another%20SharePoint%20environment%2C%20but%20the%20error%20does%20not%20happen%20there.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ESimilar%20issue%20to%3A%26nbsp%3B%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSharePoint%2FSharePoint-modern-list-view-not-displaying-items%2Fm-p%2F205627%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2FSharePoint%2FSharePoint-modern-list-view-not-displaying-items%2Fm-p%2F205627%3C%2FA%3E%3C%2FSPAN%3E)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-871974%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-874414%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-874414%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F414204%22%20target%3D%22_blank%22%3E%40joneirik%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20share%20the%20JSON%20code%20and%20list%20definition%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAs%20you%20pointed%20out%2C%20there%20are%20related%20issues%20being%20posted%20in%20the%20SharePoint%20space.%20I%20wonder%20if%20something%20%22new%22%20is%20causing%20JSON%20to%20limit%20rows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENorm%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-876842%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-876842%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20the%20reply.%20I%20gave%20up%20using%20the%20list%20view%2C%20and%20used%20the%20tiles%20instead%20formatting%20things%20using%20the%20tileProps%20value.%20This%20allowed%20me%20to%20show%20as%20many%20elements%20as%20I%20would%20like.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EThe%20issue%20with%20the%20formatting%20persisted%20even%20when%20it%20only%20contained%20a%20simple%20div%2C%20so%20I%20doubt%20it's%20the%20issue%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-879210%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-879210%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EAnother%20update.%20Using%20the%20tiles%20didn't%20really%20solve%20the%20problem%2C%20just%20created%20anther%20one%2C%20not%20being%20able%20to%20set%20the%20correct%20view%20as%20default%20for%20all%20users.%3CBR%20%2F%3E%3CBR%20%2F%3EWhat%20seems%20to%20break%20the%20json%20is%20%22float%22%3A%20%22left%22%20when%20added%20to%20the%20%22style%22%20of%20the%20main%20div.%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%20%20%22rowFormatter%22%3A%20%7B%0A%20%20%20%20%20%20%22elmType%22%3A%20%22div%22%2C%0A%20%20%20%20%20%20%22style%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22display%22%3A%20%22flex%22%2C%0A%20%20%20%20%20%20%20%20%22align-items%22%3A%20%22stretch%22%2C%0A%20%20%20%20%20%20%20%20%22margin-bottom%22%3A%20%2216px%22%2C%0A%20%20%20%20%20%20%20%20%22min-width%22%3A%20%22150px%22%2C%0A%20%20%20%20%20%20%20%20%22max-width%22%3A%20%22500px%22%2C%0A%20%20%20%20%20%20%20%20%22flex-grow%22%3A%20%221%22%2C%0A%20%20%20%20%20%20%20%20%22justify-content%22%3A%20%22space-around%22%2C%0A%20%20%20%20%20%20%20%20%22box-shadow%22%3A%20%224px%204px%208px%20grey%22%2C%0A%20%20%20%20%20%20%20%20%22float%22%3A%20%22left%22%2C%0A%20%20%20%20%20%20%20%20%22width%22%3A%20%2250%25%22%2C%0A%20%20%20%20%20%20%20%20%22padding%22%3A%20%225px%22%0A%20%20%20%20%20%20%7D%2C%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3BWhen%20added%2C%20the%20scrolling%20dies%20and%20on%20a%20refresh%20of%20the%20page%2C%20only%20a%20small%20subset%20of%20the%20items%20in%20the%20list%20is%20displayed.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%2C%20not%20having%20the%20float%20also%20sort%20of%20breaks%20the%20desired%20formatting.%20I'll%20update%20this%20post%20if%20I%20figure%20something%20out...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-891063%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-891063%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F414204%22%20target%3D%22_blank%22%3E%40joneirik%3C%2FA%3E%26nbsp%3BI'm%20have%20the%20same%20issue.%20My%20formatting%20was%20working%20until%20a%20couple%20of%20days%20ago.%20I%20also%20have%20float%3Aleft%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%20%20%22rowFormatter%22%3A%20%7B%0A%20%20%20%20%22elmType%22%3A%20%22div%22%2C%0A%20%20%20%20%22style%22%3A%20%7B%0A%20%20%20%20%20%20%22float%22%3A%20%22left%22%2C%0A%20%20%20%20%20%20%22display%22%3A%20%22flex%22%2C%0A%20%20%20%20%20%20%22flex-wrap%22%3A%20%22wrap%22%2C%0A%20%20%20%20%20%20%22flex-direction%22%3A%20%22column%22%2C%0A%20%20%20%20%20%20%22align-items%22%3A%20%22center%22%2C%0A%20%20%20%20%20%20%22justify-content%22%3A%20%22space-around%22%2C%0A%20%20%20%20%20%20%22width%22%3A%20%22160px%22%2C%0A%20%20%20%20%20%20%22height%22%3A%20%22160px%22%2C%0A%20%20%20%20%20%20%22border-radius%22%3A%20%224px%22%2C%0A%20%20%20%20%20%20%22margin-right%22%3A%20%2220px%22%2C%0A%20%20%20%20%20%20%22margin-bottom%22%3A%20%2220px%22%2C%0A%20%20%20%20%20%20%22box-shadow%22%3A%20%220px%206px%2017px%20-5px%20darkgrey%22%0A%20%20%20%20%7D%2C%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-891622%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-891622%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F111382%22%20target%3D%22_blank%22%3E%40Norman%20Young%3C%2FA%3E%26nbsp%3BThere's%20something%20buggy%20in%20the%20code%2C%20that's%20for%20sure.%3C%2FP%3E%3CP%3EI%20was%20doing%20the%20same%20thing%2C%20creating%20some%20flex%20boxes%20to%20do%20tiling.%20When%20I%20previewed%20the%20formatting%20code%2C%20it%20showed%20all%20my%20items%20nicely%20tiled%2C%20and%20showed%20all%20of%20them.%20When%20I%20saved%20the%20formatting%20code%20it%20still%20showed%20all%20the%20items.%20When%20I%20refreshed%20the%20page%20it%20only%20showed%20the%20first%2010%20items.%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20was%20only%20if%20I%20set%20the%20flex%20direction%20to%20'row'%20-%20putting%20it%20to%20'column'%20was%20OK.%3C%2FP%3E%3CP%3EOr%2C%20if%20not%20using%20flex%2C%20setting%20the%20%22hideColumnHeader%22%20to%20false%20forced%20items%20back%20to%20one%20per%20row%20and%20that%20worked.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-893311%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-893311%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F189854%22%20target%3D%22_blank%22%3E%40Robin%20Nilsson%3C%2FA%3E%26nbsp%3BI've%20tried%20all%20of%20these%20and%20still%20have%20the%20issue.%20However%2C%20I%20was%20doing%20some%20additional%20testing%2C%20and%20for%20my%20formatting%2C%20if%20the%20list%20has%20a%20total%20of%2030%20items%2C%20everything%20works%20as%20expected%2C%20regardless%20of%20paging.%20If%20the%20list%20has%2031%20or%20more%20items%2C%20this%20issue%20presents%20itself%20and%20only%2010%20are%20displayed.%20Furthermore%2C%20I%20was%20on%20a%20slow%20machine%20yesterday%20and%20could%20see%20all%20the%20items%20load%20and%20then%20quickly%20disappear.%20Checking%20the%20DOM%20I%20could%20see%20that%20they%20were%20removed.%20This%20happened%20every%20time%20the%20page%20loaded.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-899230%22%20slang%3D%22en-US%22%3ERe%3A%20Elements%20in%20a%20list%20are%20not%20showing%20after%20applying%20custom%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-899230%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F385119%22%20target%3D%22_blank%22%3E%40Arknev%3C%2FA%3E%26nbsp%3BMy%20solution%20in%20the%20end%20was%20to%20create%20a%20PowerApp%20with%20a%20gallery%20and%20some%20search%2Ffilter%20functionality.%20Not%20ideal%20in%20every%20case%20maybe%2C%20but%20works%20fine%20in%20my%20case.%20At%20least%20I'm%20able%20to%20display%20all%20~1400%20elements.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello

I have a SharePoint list where the items in the list are displayed to users using custom formatting defined using a json-file. The items that are being displayed are being displayed correctly, however, only a very small subset of the items are shown (10 when the list contains ~300 items). The view is also set to display ~60 elements pr page.

What are some possible issues? I closely recreated the list in another SharePoint environment, but the error does not happen there. 

Similar issue to: https://techcommunity.microsoft.com/t5/SharePoint/SharePoint-modern-list-view-not-displaying-items/m...)

7 Replies

Hi @joneirik,

 

Can you share the JSON code and list definition?

 

As you pointed out, there are related issues being posted in the SharePoint space. I wonder if something "new" is causing JSON to limit rows.

 

Norm

@Norman Young 

Thanks for the reply. I gave up using the list view, and used the tiles instead formatting things using the tileProps value. This allowed me to show as many elements as I would like. 

The issue with the formatting persisted even when it only contained a simple div, so I doubt it's the issue

@Norman Young 

Another update. Using the tiles didn't really solve the problem, just created anther one, not being able to set the correct view as default for all users.

What seems to break the json is "float": "left" when added to the "style" of the main div.

    "rowFormatter": {
      "elmType": "div",
      "style": {
        "display": "flex",
        "align-items": "stretch",
        "margin-bottom": "16px",
        "min-width": "150px",
        "max-width": "500px",
        "flex-grow": "1",
        "justify-content": "space-around",
        "box-shadow": "4px 4px 8px grey",
        "float": "left",
        "width": "50%",
        "padding": "5px"
      },

 When added, the scrolling dies and on a refresh of the page, only a small subset of the items in the list is displayed. 

However, not having the float also sort of breaks the desired formatting. I'll update this post if I figure something out...

@joneirik I'm have the same issue. My formatting was working until a couple of days ago. I also have float:left

 

  "rowFormatter": {
    "elmType": "div",
    "style": {
      "float": "left",
      "display": "flex",
      "flex-wrap": "wrap",
      "flex-direction": "column",
      "align-items": "center",
      "justify-content": "space-around",
      "width": "160px",
      "height": "160px",
      "border-radius": "4px",
      "margin-right": "20px",
      "margin-bottom": "20px",
      "box-shadow": "0px 6px 17px -5px darkgrey"
    },

@Norman Young There's something buggy in the code, that's for sure.

I was doing the same thing, creating some flex boxes to do tiling. When I previewed the formatting code, it showed all my items nicely tiled, and showed all of them. When I saved the formatting code it still showed all the items. When I refreshed the page it only showed the first 10 items. 

This was only if I set the flex direction to 'row' - putting it to 'column' was OK.

Or, if not using flex, setting the "hideColumnHeader" to false forced items back to one per row and that worked.

@Robin Nilsson I've tried all of these and still have the issue. However, I was doing some additional testing, and for my formatting, if the list has a total of 30 items, everything works as expected, regardless of paging. If the list has 31 or more items, this issue presents itself and only 10 are displayed. Furthermore, I was on a slow machine yesterday and could see all the items load and then quickly disappear. Checking the DOM I could see that they were removed. This happened every time the page loaded.

@Arknev My solution in the end was to create a PowerApp with a gallery and some search/filter functionality. Not ideal in every case maybe, but works fine in my case. At least I'm able to display all ~1400 elements.