diff --git a/src/Twig/Components/DownloadList.php b/src/Twig/Components/DownloadList.php index 0dff9cd..bd87851 100644 --- a/src/Twig/Components/DownloadList.php +++ b/src/Twig/Components/DownloadList.php @@ -16,15 +16,11 @@ final class DownloadList extends AbstractController { use DefaultActionTrait; + use PaginateTrait; + #[LiveProp(writable: true)] public string $type; - #[LiveProp(writable: true)] - public int $pageNumber = 1; - - #[LiveProp(writable: true)] - public int $perPage = 5; - #[LiveProp(writable: true)] public bool $isWidget = true; @@ -42,10 +38,4 @@ final class DownloadList extends AbstractController return []; } - - #[LiveAction] - public function paginate(#[LiveArg] int $page) - { - $this->pageNumber = $page; - } }