Skip to content

Commit f38efe1

Browse files
authored
Add BS4 Support
1 parent b142db8 commit f38efe1

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

resources/views/components/tools/filters/boolean.blade.php

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
$defaultValue = ($filter->hasFilterDefaultValue() ? (bool) $filter->getFilterDefaultValue() : false)
33
@endphp
44
@if($isTailwind)
5-
<div class="flex flex-cols"
6-
x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')"
7-
>
5+
<div class="flex flex-cols" x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')">
86
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
97
<input id="thisId" type="checkbox" name="switch" class="hidden" :checked="value" />
108

@@ -29,16 +27,12 @@ class="flex-shrink-0 ml-1 h-6 w-6 rounded-full inline-flex items-center justify-
2927
</template>
3028
</div>
3129
@elseif($isBootstrap4)
32-
<div class="custom-control custom-switch"
33-
x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')"
34-
>
35-
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
36-
<input id="thisId" type="checkbox" name="switch" class="custom-control-input" role="switch" :checked="value" @click="toggleStatusWithUpdate" x-ref="switchButton"/>
30+
<div class="custom-control custom-switch" x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')">
31+
<input type="checkbox" class="custom-control-input" id="customSwitch1" :checked="value" @click="toggleStatusWithUpdate" x-ref="switchButton">
32+
<x-livewire-tables::tools.filter-label class="custom-control-label" for="customSwitch1" :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
3733
</div>
3834
@else
39-
<div class="form-check form-switch"
40-
x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')"
41-
>
35+
<div class="form-check form-switch" x-data="newBooleanFilter('{{ $filter->getKey() }}', '{{ $tableName }}', '{{ $defaultValue }}')">
4236
<x-livewire-tables::tools.filter-label :$filter :$filterLayout :$tableName :$isTailwind :$isBootstrap4 :$isBootstrap5 :$isBootstrap />
4337
<input id="thisId" type="checkbox" name="switch" class="form-check-input" role="switch" :checked="value" @click="toggleStatusWithUpdate" x-ref="switchButton"/>
4438
</div>

0 commit comments

Comments
 (0)