File tree Expand file tree Collapse file tree 2 files changed +18
-4
lines changed
web-common/src/features/dashboards/time-series Expand file tree Collapse file tree 2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 278278 }),
279279 );
280280
281+ let grainDropdownOpen = false ;
282+
281283 let showReplacePivotModal = false ;
282284 function startPivotForTimeseries() {
283285 const pivot = $exploreState ?.pivot ;
322324 );
323325 }
324326
325- let open = false ;
327+ function maybeClearMeasureSelection() {
328+ // Range selection should only clear when scrub range is cleared.
329+ if (! measureSelection .isRangeSelection ()) {
330+ measureSelection .clear ();
331+ }
332+ }
326333 </script >
327334
328- <svelte:window on:click ={() => measureSelection . clear () } />
335+ <svelte:window on:click ={maybeClearMeasureSelection } />
329336
330337<TimeSeriesChartContainer
331338 enableFullWidth ={showTimeDimensionDetail }
355362 />
356363
357364 {#if $rillTime && activeTimeGrain }
358- <DropdownMenu .Root bind:open >
365+ <DropdownMenu .Root bind:open ={ grainDropdownOpen } >
359366 <DropdownMenu .Trigger asChild let:builder >
360367 <button
361368 {...builder }
365372 by <b >
366373 {V1TimeGrainToDateTimeUnit [activeTimeGrain ]}
367374 </b >
368- <span class:-rotate- 90={open } class =" transition-transform" >
375+ <span
376+ class:-rotate- 90={grainDropdownOpen }
377+ class =" transition-transform"
378+ >
369379 <CaretDownIcon />
370380 </span >
371381 </button >
Original file line number Diff line number Diff line change @@ -70,6 +70,10 @@ export class MeasureSelection {
7070 return Boolean ( get ( this . measure ) ) ;
7171 }
7272
73+ public isRangeSelection ( ) {
74+ return Boolean ( get ( this . end ) ) ;
75+ }
76+
7377 public startAnomalyExplanationChat ( metricsView : string ) {
7478 if ( ! this . hasSelection ( ) ) return ;
7579 const measure = get ( this . measure ) ! ;
You can’t perform that action at this time.
0 commit comments