I took the original livewire pagination and added more functionality to change ‘page’ to whatever you want, or disable it without having to override the methods in your component. That’s what I linked above.
I haven’t fully tested for your case, but I’m about 95% sure this will work. Let’s say you have your component in the page 3 times.
Declare all 3 query string tied variables in your component, set one as the default and then pass in your mount method which one to use. (Also in the link above, I said to set the $paginationQueryString as protected, but you will want it public.)
public $fooPage;
public $barPage;
public $bazPage;
public $paginationQueryString = 'fooPage';
public function mount($queryString = null)
{
if ($queryString) {
$this->paginationQueryString = $queryString;
$this->initializeWithPaginationExtended(); //Reinitialize the pagination with the new query string.
}
}
Then your 3 components:
@livewire('component') //will use the default fooPage.
@livewire('component', 'barPage')
@livewire('component', 'bazPage')