Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 31b4545

Browse files
committed
Fix empty id issue
1 parent ef38dba commit 31b4545

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

resources/views/components/inputs/custom-select.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
wireFilter: '{{ $attributes->wire('filter')->value() }}',
1010
@endif
1111
})"
12-
x-init="init($wire || null)"
12+
x-init="init($wire || null, $dispatch)"
1313
x-on:click.away="close()"
1414
x-on:keydown.escape="close()"
1515
x-on:keydown.enter.stop.prevent="onEnter()"
@@ -49,9 +49,9 @@ class="custom-select__filter-input"
4949

5050
@if ($hasWireFilter)
5151
<span wire:loading.class.remove="hidden"
52-
class="absolute top-4 right-4 animate-spin hidden"
52+
class="absolute top-4 -mt-0.5 right-4 animate-spin hidden"
5353
>
54-
<x-heroicon-o-refresh class="h-5 w-5 text-primary-400" />
54+
<x-heroicon-o-refresh class="h-4 w-4 text-primary-400" />
5555
</span>
5656
@endif
5757
</div>

src/Components/Inputs/CustomSelect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function config(): array
149149
'disabledField' => $this->disabledField,
150150
'max' => $this->maxOptionsSelected,
151151
'wireListeners' => $this->wireListeners,
152-
'selectId' => $this->id ?? Str::random(8),
152+
'selectId' => empty($this->id) ? Str::random(8) : $this->id,
153153
'fixedPosition' => $this->fixedPosition,
154154
];
155155
}

0 commit comments

Comments
 (0)