в строку поиска добавил крестик для удаления

This commit is contained in:
developer 2026-05-07 11:33:06 +08:00
parent 1ddf5a1a05
commit e784abd65f
2 changed files with 10 additions and 0 deletions

View File

@ -53,6 +53,11 @@ public function toggleComplex($complexId)
$this->updated();
}
public function removeSearchString() {
unset($this->filter['search']);
$this->updated();
}
public function updated()
{
$this->dispatch('clientsTableFilterUpdated', filter: $this->filter);

View File

@ -84,6 +84,11 @@
</span>
<input wire:model.live="filter.search" type="text" class="form-control form-control-lg"
placeholder="Поиск по имени, телефону, электронной почте">
@if(array_key_exists('search', $filter))
<button wire:click="removeSearchString()" class="btn btn-light m-1 btn-sm" style="z-index:1000;width:2rem;height:2rem;position:absolute;right:0;top: calc(50% - 1.2rem);">
<i class="bi bi-x-lg"></i>
</button>
@endif
</div>
<!-- Выбор ЖК-->
<div class="btn-group bg-light d-flex rounded-4 ">