In my Lightning Component, I'm using
<force:recordEdit recordId="{!v.recordId}" />
Now this produces an non-collapsible output looking like this:
However the Salesforce Standard Lightning Component "Record Detail" available in the App Builder can produce collapsible results as expected when the edit-mode is invoked by clicking on the pencil in the View:
Can this be produced also by our own components? If so, how?