Closed raimohanska closed 4 years ago
how about just a containerId : string | null on each item, and remove "items" from Container type? this way we could still work with board.items for all the selection etc operations.
adding/removing an item from a container would mean just setting the property to string or null. removing a container would mean items = items.filter(i => i.containerId === deletedContainerId)
^above is implemented
We should probably use a hierarchical data model where items are actually contained in Containers. This will ensure that containers do not contain ids that are no longer on the board. Also, deleting/adding containers becomes easy as the children are naturally contained.
The UI on the other hand probably should remain flat at least to start with. Not sure of what effects nesting ItemViews would have on UI features.