Skip to content

Pagination Path Changes After Livewire Update #23

Description

@0smr

After a Livewire component re-renders, the pagination path changes to livewire/update/page/, which disrupts the functionality of pagination links.

The Pagi library uses get_pagenum_link, which relies on REQUEST_URI as the reference URL for the path.
To address this, I temporarily modified the REQUEST_URI as follows:

$tmp = $_SERVER['REQUEST_URI'];
$_SERVER['REQUEST_URI'] = $this->baseUrl;
$links = PagiFacade::build()->links();
$_SERVER['REQUEST_URI'] = $tmp;

Is there any other recommended solution to resolve this issue?

Thank you in advance

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions