File tree Expand file tree Collapse file tree 2 files changed +1
-50
lines changed Expand file tree Collapse file tree 2 files changed +1
-50
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
13
13
### Changed
14
14
15
15
- Minimum Livewire version to 2.6.2 to avoid 2.6.1 bug.
16
+ - Remove our custom pagination as Livewire 2.6 supports multiple pagination per page now.
16
17
17
18
## [ 1.14.0] - 2021-08-31
18
19
Original file line number Diff line number Diff line change 2
2
3
3
namespace Rappasoft \LaravelLivewireTables \Traits ;
4
4
5
- use Illuminate \Pagination \Paginator ;
6
5
use Livewire \WithPagination ;
7
6
8
7
/**
@@ -24,53 +23,4 @@ public function pageName(): string
24
23
25
24
return 'page ' ;
26
25
}
27
-
28
- /**
29
- * @return array
30
- */
31
- public function getQueryString ()
32
- {
33
- return array_merge ([$ this ->pageName () => ['except ' => 1 ]], $ this ->queryString );
34
- }
35
-
36
- public function initializeWithPagination (): void
37
- {
38
- $ this ->{$ this ->pageName ()} = $ this ->resolvePage ();
39
-
40
- Paginator::currentPageResolver (function () {
41
- return $ this ->{$ this ->pageName ()};
42
- });
43
-
44
- Paginator::defaultView ($ this ->paginationView ());
45
- }
46
-
47
- public function previousPage (): void
48
- {
49
- $ this ->setPage ($ this ->{$ this ->pageName ()} - 1 );
50
- }
51
-
52
- public function nextPage (): void
53
- {
54
- $ this ->setPage ($ this ->{$ this ->pageName ()} + 1 );
55
- }
56
-
57
- public function setPage ($ page ): void
58
- {
59
- $ this ->{$ this ->pageName ()} = $ page ;
60
- }
61
-
62
- /**
63
- * @return array|null|string
64
- */
65
- public function resolvePage ()
66
- {
67
- return request ()->query ($ this ->pageName (), $ this ->{$ this ->pageName ()});
68
- }
69
-
70
- public function getPublicPropertiesDefinedBySubClass ()
71
- {
72
- return tap (parent ::getPublicPropertiesDefinedBySubClass (), function (&$ props ) {
73
- $ props [$ this ->pageName ()] = $ this ->{$ this ->pageName ()};
74
- });
75
- }
76
26
}
You can’t perform that action at this time.
0 commit comments