refactor: Move IDs inside collection
AntonTymczenko opened this issue · comments
Anton Tymczenko commented
*bug: * When User at collectionNew
leaves the page, should not save to localStorage.
*solution: *
- Make all collections have IDs inside of itself.
- Put some counter in
state
, increment it on every added collection tocollections
array - CollectionNew component in its
created
lifecycle hook should create a collection with id=temporary instate
. If it is already there – overwrite it with blank collection - CollectionNew shoud save
id=temporary
collection tocollections
with some other, numbered, ID. It should save on @save event received from childCollectionEdit