File tree Expand file tree Collapse file tree 1 file changed +25
-12
lines changed
resources/views/tailwind/includes Expand file tree Collapse file tree 1 file changed +25
-12
lines changed Original file line number Diff line number Diff line change 1
- <div class =" mt-1 relative rounded-md shadow-sm" >
2
- <select
3
- wire:model.stop =" filters.{{ $key } }"
4
- wire:key =" filter-{{ $key } }"
5
- id =" filter-{{ $key } }"
6
- class =" rounded-md shadow-sm block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-300 focus:outline-none focus:border-indigo-300 focus:shadow-outline-indigo sm:text-sm sm:leading-5"
7
- multiple =" multiple"
8
- >
9
- @foreach ($filter -> options () as $key => $value )
10
- <option value =" {{ $key } }" >{{ $value } } </option >
11
- @endforeach
12
- </select >
1
+ <div class =" mt-1 relative rounded-md" >
2
+ {{-- We're not using a select element, but for UX, we choose checkboxes--}}
3
+ {{-- <select--}}
4
+ {{-- wire:model.stop="filters.{{ $key }}"--}}
5
+ {{-- wire:key="filter-{{ $key }}"--}}
6
+ {{-- id="filter-{{ $key }}"--}}
7
+ {{-- class="rounded-md shadow-sm block w-full pl-3 pr-10 py-2 text-base leading-6 border-gray-300 focus:outline-none focus:border-indigo-300 focus:shadow-outline-indigo sm:text-sm sm:leading-5"--}}
8
+ {{-- multiple="multiple"--}}
9
+ {{-- >--}}
10
+ {{-- @foreach($filter->options() as $key => $value)--}}
11
+ {{-- <option value="{{ $key }}">{{ $value }}</option>--}}
12
+ {{-- @endforeach--}}
13
+ {{-- </select>--}}
14
+
15
+ @foreach ($filter -> options () as $k => $value )
16
+ <input
17
+ type =" checkbox"
18
+ id =" filter-{{ $key } } -{{ $loop -> index } }"
19
+ wire:key =" filter-{{ $key } } -{{ $loop -> index } }"
20
+ wire:model.stop =" filters.{{ $key } } .{{ $loop -> index } }"
21
+ value =" {{ $k } }"
22
+ >
23
+ <label for =" filter-{{ $key } } -{{ $loop -> index } }" >{{ $value } } </label >
24
+ <br >
25
+ @endforeach
13
26
</div >
You can’t perform that action at this time.
0 commit comments