Skip to content

Commit e78ebbc

Browse files
authored
Merge pull request z-song#5328 from takkkken/fixed_bitween_filter_ui
Fixed to allow many inputmask type in between filter.
2 parents 8a95362 + 1519fe6 commit e78ebbc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

resources/views/filter/between.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<label class="col-sm-2 control-label">{{$label}}</label>
33
<div class="col-sm-8" style="width: 390px">
44
<div class="input-group input-group-sm">
5-
<input type="text" class="form-control" placeholder="{{$label}}" name="{{$name['start']}}" value="{{ request()->input("{$column}.start", \Illuminate\Support\Arr::get($value, 'start')) }}">
5+
<input type="text" class="form-control {{$id['start']}}" placeholder="{{$label}}" name="{{$name['start']}}" value="{{ request()->input("{$column}.start", \Illuminate\Support\Arr::get($value, 'start')) }}">
66
<span class="input-group-addon" style="border-left: 0; border-right: 0;">-</span>
7-
<input type="text" class="form-control" placeholder="{{$label}}" name="{{$name['end']}}" value="{{ request()->input("{$column}.end", \Illuminate\Support\Arr::get($value, 'end')) }}">
7+
<input type="text" class="form-control {{$id['end']}}" placeholder="{{$label}}" name="{{$name['end']}}" value="{{ request()->input("{$column}.end", \Illuminate\Support\Arr::get($value, 'end')) }}">
88
</div>
99
</div>
1010
</div>

src/Grid/Filter/Presenter/Text.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,11 @@ public function inputmask($options = [], $icon = 'pencil'): self
162162
{
163163
$options = json_encode($options);
164164

165-
Admin::script("$('#{$this->filter->getFilterBoxId()} input.{$this->filter->getId()}').inputmask($options);");
165+
$ids = (array) $this->filter->getId();
166+
167+
foreach ($ids as $id) {
168+
Admin::script("$('#{$this->filter->getFilterBoxId()} input.{$id}').inputmask($options);");
169+
}
166170

167171
$this->icon = $icon;
168172

0 commit comments

Comments
 (0)