This repository has been archived by the owner on Aug 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Remove the 'models' Input from ModelModalComponent #28
Comments
Closed
2 tasks
This would also likely fix the occasional:
issue in downstream projects. |
CloudNiner
pushed a commit
to azavea/temperate
that referenced
this issue
Dec 19, 2017
Likely exposed by ClimateModel list being returned immediately from the cache, causing the following steps to occur: 1. Dataset changes in ModelModalComponent 2. Triggers model list API request 3. ModelModalComponent.onModelsChanged fired 4. IndicatorChart.models is set from change event 5. Triggers onChanges for ModelModalComponent.models Before, the model list API request happening asynchronously was enough to break this chain of events. We can fix the error by wrapping the update to IndicatorChart.models in a setTimeout, which delays checking until next cycle. This is a temporary fix, when: azavea/climate-change-components#28 is addressed, this fix should be removed as well.
It was decided that this actually cannot be removed, since its used to power the user projects settings in Lab. It's likely if we revisit Lab interactions that we'll want to improve the handling of how we pass the list of models to/from this component. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The ModelModalComponent queries for the models available based on the input dataset. It shouldn't be necessary to also Input a list of models.
Additionally, keeping this input around causes issues with downstream projects that shouldn't need to pass an initial list of models, but also can't pass a null initial value due to #27. As a result, defaulting
models
to an empty array when initializing a ModelModalComponent causes this error querying the Climate API:The text was updated successfully, but these errors were encountered: