Closed corviday closed 1 year ago
In the demo, the graph on the right hand side doesn't change when I change watersheds. Is that right? The map does, though, and it's really snappy and cool.
Good catch. I noticed this bug yesterday, but I'm not sure exactly when it snuck into the codebase. It seems likely to be a fairly straightforward issue of making sure I'm using the react hooks correctly for the graphs, since the salmon table does update when you change watersheds.
This project uses sophisticated selectors from pcic-react-components. Previously I'd misunderstood how the selectors worked, and as a result, when you selected an item with a dropdown, the dropdown would remain blank - it would not show which item you had selected. I was passing it the wrong thing.
All components with a selector have been modified to store the correct component in state; in the case of MapDisplay a new state variable was added to do this.
Demo here.
Resolves #28