SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

FieldCustomizer extensions preventing GroupBy list details from rendering #8944

Open elliot-j opened 1 year ago

elliot-j commented 1 year ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

I have several lists with a View grouped by a Taxonomy term set and the lists have a Field customizer extension applied to the standard Title field. When a user clicks on a specific group in the Grouped by View to render the list with items from a specific group, the list will sometimes not render and only the list title is visible.

enter image description here

When the user refreshes the page, the content loads as expected. Also removing the extension allows the list to load normally. To rule out the issue being with our extension, I have tried replacing it with the HelloWorld extension demo at https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-field-customizer as well as upgrading the SPFx version from 1.14.0 to 1.17.0, but the issue persisted. Browser DEV tools and the Sharepoint Console are not reporting any errors, and I do not see any failed network requests that would indicate a server error. The list I've been reproducing this on only has 6 items in it and the view is configured to display 17 fields so I'm pretty sure this isn't an issue with our list definition returning too many fields/items.

The View Query is pretty basic so I don't think the issue lies there

<GroupBy Collapse="TRUE" GroupLimit="30"><FieldRef Name="Subcycle" /></GroupBy><OrderBy><FieldRef Name="TrackingId" /></OrderBy>

I have tried removing a custom formatter and disabling the aggregate measure on the list for good measure but the issue still occurs. I have not been able to reproduce this issue on default sharepoint list, but I've run out of ideas to try and isolate a root cause. As best I can tell, the Field Customizer extension constructor never gets invoked when sharepoint transitions from the Group By list view to the Group Details list view. Is there some other list property or sharepoint configuration that could be causing this issue that I may be overlooking, or am I perhaps seeing a sharepoint bug?

Steps to reproduce

  1. Add a FieldCustomizer extension to a list field like Title
  2. Create a View on a list that displays in groups (ex "Issue Type"), see the groups to be collapsed by default
  3. Navigate the the Group By view and click on one of the collapsed groups to get take to a List View that shows only the items in that specific group

This issue is not consistent. I sometimes have to refresh the list view and repeat the repro steps 20 plus times in order to trigger the issue

Expected behavior

Upon clicking on a specific group the list updates to show only the relevant items

enter image description here

ghost commented 1 year ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.