danieltsoukup / noise-dashboard

Noise monitoring application built as part of a CivicTechTO initiative.
MIT License
3 stars 3 forks source link

Device ID and Date filter interaction #7

Closed danieltsoukup closed 5 months ago

danieltsoukup commented 5 months ago

Describe the bug If we filter currently the date with the heatmap and then switch device ID and no data is available for that week for the new device ID, then the line chart won't change.

To Reproduce Steps to reproduce the behavior:

  1. Select a99
  2. Click on the heatmap to filter for Jan 1
  3. Select gabe1 as the device ID
  4. See error: still showing a99 on the line chart

Expected behavior If the callback is triggered by selecting a new device then the click data should be ignored and only the most recent measurements for the device should be shown. Tip: use callback context

danieltsoukup commented 5 months ago

Solved by JP - behaviour set to keep the selected date if available for the new selected device, otherwise jump to last available date.