First approach was adding a collapsed property into ui-core state. This led to making changes in many other places and adding another call Engine.render. It didn't seem ideal.
To keep the functionality contained within the historical-navigation component I have added a document event listener which will execute when an outcome is clicked. The listener will update the local component state to collapse the navigation items.
Edit: Changed the approach to collapsing the historical nav items whenever the entries array changes.
First approach was adding a collapsed property into ui-core state. This led to making changes in many other places and adding another call Engine.render. It didn't seem ideal. To keep the functionality contained within the historical-navigation component I have added a document event listener which will execute when an outcome is clicked. The listener will update the local component state to collapse the navigation items.
Edit: Changed the approach to collapsing the historical nav items whenever the entries array changes.