Hi,
I have a frontend livewire list that is rendered in a component, called with {% livewire 'employelistfilter' user=user %}
. It has pagination, added with {{ pager(employes) }}
at the end of my loop.
At the top of my list, I have a search text field, among other filter dropdowns.
As soon as I reset the searchbar text field, the pagination url changes from https:/my-domain.com/team?page=2 to https://my-domaine.com/livewire/update?page=2
class EmployeListFilter extends LivewireBase
{
public $search = "";
public $contrat_type = "";
public function render()
{
$employees = [];
$employees = Employe::whereAny([
'nom',
'prenom',
'fonction',
'localite',
'initiales',
], 'LIKE', '%' . $this->search .'%')
->when($this->contrat_type !== "", function ($q) {
return $q->where('is_temporaire', $this->contrat_type);
})
->actifs()->orderByDesc('is_direction')->orderBy('nom')->orderBy('prenom');
return \View::make('jan.gestion::livewire.employelistfilter',[
'employes' => $employees->paginate(25),
'total' => $employees->count(),
]);
}
}
The search text field looks like that :
<input wire:model.live.debounce.250ms="search" id="search_input" type="search" placeholder="Rechercher" class="form-control" aria-label="Search">
Do you havy any idea why this happens ? Thank a lot for your help.