11<div x-data =" customSelect({
22 {{ $configToJson () } }
3- @if ($hasWireModel = $ attributes-> whereStartsWith (' wire:model' ) -> first ( ) )
3+ @if ($attributes -> hasStartsWith (' wire:model' ) )
44 value: @entangle ($attributes -> wire (' model' ) ),
55 @else
66 value: {{ $selectedKeyToJS () } } ,
77 @endif
8- @if ($hasWireFilter = $ attributes-> whereStartsWith (' wire:filter' ) -> first ( ) )
8+ @if ($attributes -> hasStartsWith (' wire:filter' ) )
99 wireFilter: '{{ $attributes -> wire (' filter' )-> value () } } ',
1010 @endif
1111 })"
12- x-init =" init({{ $hasWireModel ? ' $wire' : ' null' } } , $dispatch)"
12+ x-init =" init({{ $attributes -> hasStartsWith ( ' wire:model ' ) ? ' $wire' : ' null' } } , $dispatch)"
1313 x-on:click.outside =" close()"
1414 x-on:keydown.escape =" close()"
1515 x-on:keydown.enter.stop.prevent =" onEnter()"
@@ -31,7 +31,7 @@ class="custom-select__menu-container absolute w-full rounded-md bg-white shadow-
3131 <div class =" custom-select__filter relative py-2 px-2 border-b border-blue-gray-200" >
3232 <input x-ref =" search"
3333 x-show =" open"
34- @if ($hasWireFilter )
34+ @if ($attributes -> hasStartsWith ( ' wire:filter ' ) )
3535 wire:loading.class =" busy"
3636 wire:target =" {{ $attributes -> wire (' filter' )-> value () } }"
3737 @endif
@@ -41,7 +41,7 @@ class="custom-select__menu-container absolute w-full rounded-md bg-white shadow-
4141 class =" custom-select__filter-input py-1 h-full w-full border-blue-gray-300 rounded-md bg-white focus:border-blue-gray-400 focus:ring-0 text-sm focus:outline-none"
4242 />
4343
44- @if ($hasWireFilter )
44+ @if ($attributes -> hasStartsWith ( ' wire:filter ' ) )
4545 <span wire:loading.class.remove =" hidden"
4646 class =" absolute top-4 -mt-0.5 right-4 animate-spin hidden"
4747 >
@@ -77,7 +77,7 @@ class="custom-select__menu py-1 overflow-auto text-base leading-6 rounded-md sha
7777 @include (' form-components::partials.leading-addons' )
7878 @include (' form-components::partials.custom-select-button' )
7979
80- @unless ($hasWireModel )
80+ @unless ($attributes -> hasStartsWith ( ' wire:model ' ) )
8181 <input type =" hidden" x-bind:value =" JSON.stringify(value)" name =" {{ $name } }" >
8282 @endif
8383</div >
0 commit comments