Collapse text element when corresponding field in dynamic collection is empty

Hello folks,

I have a collection connected to a page where I get white space because sometimes, the corresponding fields in the collection are empty.

Does anyone know how to code this to collapse the text elements causing the white space?

Thanks,

Jessie

https://www.wix.com/corvid/reference/$w.CollapsedMixin.html