File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 <div class =" p-4 flex items-center gap-2 justify-between bg-gray-50" >
2626
2727 <div class =" p-4 flex items-center gap-2" >
28- @if ($this -> isCardViewEnabled () )
28+ @if ($this -> isCardViewEnabled () && ! $this -> isCardOnly () )
2929 @include (' query-builder::components.view-toggle' )
3030 @endif
3131
Original file line number Diff line number Diff line change 88 @if ($this -> isSearchVisible () && $this -> searchableColumnsSet () && ! $this -> areActionsVisible () )
99 @if ($this -> isFiltered () || $this -> isSearchActive () || $this -> rows -> count () > 0 )
1010 <div class =" p-4 flex items-center gap-2 w-full" >
11- @if ($this -> isCardViewEnabled () )
11+ @if ($this -> isCardViewEnabled () && ! $this -> isCardOnly () )
1212 @include (' query-builder::components.view-toggle' )
1313 @endif
1414
Original file line number Diff line number Diff line change @@ -13,6 +13,18 @@ public function cardLayout(): ?CardLayout
1313 return null ;
1414 }
1515
16+ public function isCardOnly (): bool
17+ {
18+ return false ;
19+ }
20+
21+ public function mountWithCardView (): void
22+ {
23+ if ($ this ->isCardOnly () && $ this ->isCardViewEnabled ()) {
24+ $ this ->viewMode = 'cards ' ;
25+ }
26+ }
27+
1628 public function toggleViewMode (): void
1729 {
1830 $ this ->viewMode = $ this ->viewMode === 'table ' ? 'cards ' : 'table ' ;
You can’t perform that action at this time.
0 commit comments