File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -58,13 +58,14 @@ public function toArray(): array
5858 $ this ->disabledKey => $ this ->isDisabled (),
5959 $ this ->childrenKey => $ this ->getChildrenToArray (),
6060 ])
61- ->filter (function ($ value ,$ key ) {
62- if ($ key === $ this ->childrenKey ) {
63- return !empty ($ value );
61+ ->filter (function ($ value , $ key ) {
62+ if ($ key === $ this ->childrenKey ) {
63+ return ! empty ($ value );
6464 }
65- if ($ key === $ this ->disabledKey && $ value === false ) {
65+ if ($ key === $ this ->disabledKey && $ value === false ) {
6666 return false ;
6767 }
68+
6869 return true ;
6970 })
7071 ->toArray ();
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ trait CanRefresh
1010 public function refreshAfterExecuted (bool | Closure $ refresh = false ): static
1111 {
1212 $ this ->after ['refresh ' ] = $ this ->evaluate ($ refresh );
13+
1314 return $ this ;
1415 }
1516
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public function resolveModels(): void
3737 throw_if (empty ($ primaryKey ), new DatatableUnableToResolveModelPrimaryKeyException ());
3838
3939 // Not all selected and not selected rows at all
40- if (! $ this ->isAllSelected () && !$ this ->hasSelectedRows ()) {
40+ if (! $ this ->isAllSelected () && ! $ this ->hasSelectedRows ()) {
4141 return ;
4242 }
4343
@@ -46,7 +46,7 @@ public function resolveModels(): void
4646 $ this
4747 ->getQuery ()
4848 ->clone ()
49- ->when (!$ this ->isAllSelected (), fn ($ query ) => $ query ->whereIn ($ primaryKey , $ this ->getSelectedRowsIds ()))
49+ ->when (! $ this ->isAllSelected (), fn ($ query ) => $ query ->whereIn ($ primaryKey , $ this ->getSelectedRowsIds ()))
5050 ->get () ?? Collection::make ()
5151 );
5252 }
You can’t perform that action at this time.
0 commit comments