TheNounProject / CollectionView

An easy to use, highly customizable replacement for NSCollectionView.
MIT License
121 stars 16 forks source link

Collapsable sections in provider #10

Closed WCByrne closed 6 years ago

WCByrne commented 6 years ago

Collapsing sections is a fairly common use case but managing that state can get a little complicated.

With CollectionViewProvider already able to handle connecting your data to your collection view and managing options like empty placeholders, adding collapsable state management is a welcome addition.

Changes to data from the results controller will be adjusted as needed to account for any collapsed sections.

Sections can also be collapsed by default using defaultCollapse. If true, all sections will be collapsed when the data is loaded and any inserted sections will be added in the collapsed state.