Commit fcebddd
fix(dashboards): Respect current time series interval in Widget Viewer (#109766)
Pass the dashboard's user-selected interval to the Widget Viewer Modal
so
that opening a widget in full screen preserves the chosen interval
instead
of reverting to the default. This is especially important when we remove
our custom data cache. If the interval changes, TanStack will issue
another
network request to fetch the data!
The interval selection feature lets users pick a chart interval (e.g.
1m,
15m) for all time series widgets on a dashboard. This value was already
threaded through the main dashboard widget rendering path, but the
Widget
Viewer Modal never received it. When a widget was opened in full screen,
its chart would re-fetch data without the interval override, causing a
jarring change in granularity.
Three changes:
- Add `widgetInterval` to `WidgetViewerModalOptions` and pass it to the
chart container and all table query components inside the modal
- Add `widgetInterval` to `WidgetCardChartContainer` props so it can
forward the value to `WidgetCardDataLoader`
- Pass `this.props.widgetInterval` when opening the modal in
`DashboardDetail.checkIfShouldMountWidgetViewerModal`
Refs DAIN-1257
Co-authored-by: Claude <noreply@anthropic.com>1 parent 5b9a5d2 commit fcebddd
File tree
3 files changed
+10
-0
lines changed- static/app
- components/modals
- views/dashboards
- widgetCard
3 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
| |||
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
| 565 | + | |
563 | 566 | | |
564 | 567 | | |
565 | 568 | | |
| |||
583 | 586 | | |
584 | 587 | | |
585 | 588 | | |
| 589 | + | |
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
| |||
607 | 611 | | |
608 | 612 | | |
609 | 613 | | |
| 614 | + | |
610 | 615 | | |
611 | 616 | | |
612 | 617 | | |
| |||
676 | 681 | | |
677 | 682 | | |
678 | 683 | | |
| 684 | + | |
679 | 685 | | |
680 | 686 | | |
681 | 687 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
311 | 312 | | |
312 | 313 | | |
313 | 314 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| 123 | + | |
121 | 124 | | |
122 | 125 | | |
123 | 126 | | |
| |||
0 commit comments