NYCPlanning / labs-regional-viz

An interactive mapping experience that highlights regional planning data and trends.
Other
6 stars 1 forks source link

Current selected geography switches back after toggling off narrative #81

Closed allthesignals closed 6 years ago

allthesignals commented 6 years ago

What should happen:

Clicking narrative sidebar should only hide the narrative sidebar.

What happened instead:

It resets the currently selected geographyLevel to the default

This is because we reset the default of the geography level property in the didUpdateAttrs hook. @andycochran this is what I meant by this seeming like the wrong approach, since that hook is used for all sorts of things. We might use a different hook - it should only happen maybe when the route changes, right? Not sure the best way to approach. I wonder if this state should be controlled in the route -> controller at first. Then, pass it from the map controller -> to the component.