File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 99 @endif
1010 </div >
1111 <div class =" app-widget__chart" >
12+ <form method =" GET" action =" {{ $url } }" onchange =" this.requestSubmit();" >
13+ <div class =" form-group" >
14+ <label class =" form-label sr-only" for =" widget-{{ $key } } }-interval" >{{ __ (' Interval' ) } } </label >
15+ <select class =" form-control form-control--sm" name =" range" id =" widget-{{ $key } } }-interval" >
16+ @foreach ($ranges as $range => $rangeLabel )
17+ <option value =" {{ $range } }" @selected ($range === $currentRange )>{{ $rangeLabel } } </option >
18+ @endforeach
19+ </select >
20+ </div >
21+ </form >
1222 <x-root::chart :config =" $data['chart']" />
1323 </div >
1424 </div >
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ public function data(Request $request): array
143143 {
144144 return array_merge (parent ::data ($ request ), [
145145 'ranges ' => $ this ->ranges (),
146+ 'currentRange ' => $ this ->getCurrentRange ($ request ),
146147 'data ' => (! $ this ->async || $ request ->isTurboFrameRequest ()) ? $ this ->calculate ($ request ) : [],
147148 ]);
148149 }
You can’t perform that action at this time.
0 commit comments