mavo
mavo copied to clipboard
A default collection, created by the html specification of a Mavo, causes a save to storage
Mavo is designed so that nothing is saved to storage until some part of the data takes on a non-default value (an efficient idea, since if all values are defaults there is no point in storing them). However, if one defines a collection in the app, its initial value (a single item, or something else if mv-initial-items is used) is treated as "new" data and triggers a save. The code that creates the initial collection should read unsavedChanges beforehand and restore it after.