SwiftUI List in SidebarListStyle only renders 1 item when data comes from a StateObject

Number:rdar://FB7833192 Date Originated:06/30/2020
Status:Open Resolved:
Product:SwiftUI Framework Product Version:macOS 11.0 Beta (20A4299v)
Classification:Incorrect/Unexpected Behavior Reproducible:Yes
When using SwiftUI List with the SidebarListStyle, where the data for the list is bound to a StateObject that loads the data asynchronously, the List only renders the first item regardless of how many elements are in the list. By either using the default list style, or getting the data from a constant array instead of the StateObject, the full list of items renders successfully.

Please see the attached Xcode project for a minimal repro.


See example project at https://github.com/indragiek/radars/tree/master/FB7833192


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!