Grouped Details List - Default Collapsed

%3CLINGO-SUB%20id%3D%22lingo-sub-78974%22%20slang%3D%22en-US%22%3EGrouped%20Details%20List%20-%20Default%20Collapsed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-78974%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20are%20using%20a%20%22%3CA%20href%3D%22https%3A%2F%2Fdev.office.com%2Ffabric%23%2Fcomponents%2Fdetailslist%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ESimple%20Grouped%20DetailsList%3C%2FA%3E%22%20from%20Office%20UI%20Fabric.%20Is%20there%20a%20way%20for%20the%20groups%20to%20default%20to%20being%20collapsed%20rather%20than%20being%20expanded%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-78974%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-161119%22%20slang%3D%22en-US%22%3ERe%3A%20Grouped%20Details%20List%20-%20Default%20Collapsed%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-161119%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20do%20this%20by%20setting%20the%20'%3CSPAN%3EisCollapsed'%20property%20to%20true%20for%20all%20groups.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ESee%20the%20optional%20members%20on%20the%20'IGroup'%20interface%20in%20the%26nbsp%3B%3C%2FSPAN%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.microsoft.com%2Fen-us%2Ffabric%23%2Fcomponents%2Fgroupedlist%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Edocumentation%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

We are using a "Simple Grouped DetailsList" from Office UI Fabric. Is there a way for the groups to default to being collapsed rather than being expanded?

1 Reply

You can do this by setting the 'isCollapsed' property to true for all groups.

See the optional members on the 'IGroup' interface in the documentation