mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 12:10:41 -05:00
Saves Filter Data in Session
Adds back in the Session attribute. Apparently if you add it first, before the Url attribute, you can alter the variables in the URL and the changes will stick around.
This commit is contained in:
parent
70462eaae5
commit
348e7aa532
@ -9,6 +9,7 @@ use Illuminate\Contracts\View\View;
|
|||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
use Livewire\Attributes\Computed;
|
use Livewire\Attributes\Computed;
|
||||||
|
use Livewire\Attributes\Session;
|
||||||
use Livewire\Attributes\Url;
|
use Livewire\Attributes\Url;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
use Livewire\WithPagination;
|
use Livewire\WithPagination;
|
||||||
@ -20,24 +21,28 @@ class Listing extends Component
|
|||||||
/**
|
/**
|
||||||
* The search query value.
|
* The search query value.
|
||||||
*/
|
*/
|
||||||
|
#[Session]
|
||||||
#[Url]
|
#[Url]
|
||||||
public string $query = '';
|
public string $query = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The sort order value.
|
* The sort order value.
|
||||||
*/
|
*/
|
||||||
|
#[Session]
|
||||||
#[Url]
|
#[Url]
|
||||||
public string $order = 'created';
|
public string $order = 'created';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The SPT versions filter value.
|
* The SPT versions filter value.
|
||||||
*/
|
*/
|
||||||
|
#[Session]
|
||||||
#[Url]
|
#[Url]
|
||||||
public array $sptVersions = [];
|
public array $sptVersions = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The featured filter value.
|
* The featured filter value.
|
||||||
*/
|
*/
|
||||||
|
#[Session]
|
||||||
#[Url]
|
#[Url]
|
||||||
public string $featured = 'include';
|
public string $featured = 'include';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user