In the application we are developing, we have a CollectionView, whose ItemView contains a link to the details page. In addition, each ItemView contains a check box because items can be selected in CollectionView to perform bulk actions on them.
When switching to the ItemDetails view, we want to save the state of the CollectionView , ideally, without having to redraw it (a bit like GMail when switching from Inbox to mail and back). Our solution is to display two views in two different areas and hide them when switching from one to the other .
My perplexity regarding this decision is that
- Marionette does not seem to be intended for such use.
- not very memory friendly as all DOM elements are never deleted.
Is there a better solution to achieve this? Saving state somewhere, closing CollectionView and then redrawing it is another possible solution, but will it mean heavy computational overhead? (we are very afraid of redrawing views).
xbill source
share