Skip to content

Commit 64b54a3

Browse files
committed
Further Fixes
1 parent cdb4578 commit 64b54a3

File tree

8 files changed

+39
-26
lines changed

8 files changed

+39
-26
lines changed

resources/views/components/pagination.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@aware(['isTailwind','isTailwind4','isBootstrap','isBootstrap4', 'isBootstrap5', 'localisationPath'])
2-
@props(['currentRows'])
2+
@php($currentRows = $this->getRows)
33
@includeWhen(
44
$this->hasConfigurableAreaFor('before-pagination'),
55
$this->getConfigurableAreaFor('before-pagination'),
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
1-
@aware(['tableName','primaryKey'])
2-
@props(['bulkActionsTdAttributes','bulkActionsTdCheckboxAttributes', 'currentRows'])
1+
@aware(['tableName','primaryKey','isTailwind', 'isTailwind4', 'isBootstrap', 'coreTableAttributes'])
2+
@props(['bulkActionsTdAttributes','bulkActionsTdCheckboxAttributes'])
33

4-
<x-livewire-tables::table.main>
5-
<x-livewire-tables::thead />
4+
<table {{ $attributes->merge($coreTableAttributes['table'])
5+
->class([
6+
'rappasoft-livewire-table-new' => $isTailwind,
7+
'divide-gray-200 dark:divide-none' => $isTailwind && ($coreTableAttributes['table']['default-colors'] ?? ($coreTableAttributes['table']['default'] ?? true)),
8+
'min-w-full divide-y' => $isTailwind && ($coreTableAttributes['table']['default-styling'] ?? ($coreTableAttributes['table']['default'] ?? true)),
9+
10+
'tw4ph rappasoft-livewire-table-new' => $isTailwind4,
11+
'tw4ph divide-gray-200 dark:divide-none' => $isTailwind4 && ($coreTableAttributes['table']['default-colors'] ?? ($coreTableAttributes['table']['default'] ?? true)),
12+
'tw4ph min-w-full divide-y' => $isTailwind4 && ($coreTableAttributes['table']['default-styling'] ?? ($coreTableAttributes['table']['default'] ?? true)),
613
14+
'' => $isBootstrap && ($coreTableAttributes['table']['default-colors'] ?? ($coreTableAttributes['table']['default'] ?? true)),
15+
'laravel-livewire-table table' => $isBootstrap && ($coreTableAttributes['table']['default-styling'] ?? ($coreTableAttributes['table']['default'] ?? true)),
16+
])
17+
->except(['default','default-styling','default-colors', 'wire:key']) }}
18+
wire:key="bookingitemstable-table-{{ rand(5828,458218) }}"
19+
>
20+
<x-livewire-tables::thead />
21+
@php($currentRows = $this->getRows)
722
@if(count($currentRows) > 0)
823
@tableloop ($currentRows as $rowIndex => $row)
924
@php($rowPk = $row->{$primaryKey})
@@ -14,5 +29,4 @@
1429
@endif
1530

1631
<x-livewire-tables::tfoot />
17-
18-
</x-livewire-tables::table.main>
32+
</table>

resources/views/components/tfoot/tr/footer-titles.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@aware(['tableName','isTailwind', 'isTailwind4', 'isBootstrap', 'currentlyReorderingStatus', 'showBulkActionsSections', 'showCollapsingColumnSections','selectedVisibleColumns', 'currentRows'])
1+
@aware(['tableName','isTailwind', 'isTailwind4', 'isBootstrap', 'currentlyReorderingStatus', 'showBulkActionsSections', 'showCollapsingColumnSections','selectedVisibleColumns'])
22

33
<x-livewire-tables::table.tr.plain :rowIndex="-1" data-id="tfoot"
4-
:customAttributes="$this->getFooterTrAttributes($currentRows)"
4+
:customAttributes="$this->getFooterTrAttributes($this->getRows)"
55
wire:key="{{ $tableName .'-footer' }}"
66
>
77
@if($currentlyReorderingStatus)

resources/views/components/tfoot/tr/footer.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@aware([ 'tableName', 'selectedVisibleColumns','showBulkActionsSections','hasCollapsingColumns', 'filterGenericData', 'currentRows'])
1+
@aware([ 'tableName', 'selectedVisibleColumns','showBulkActionsSections','hasCollapsingColumns', 'filterGenericData'])
22

33
<x-livewire-tables::table.tr.plain :rowIndex="-1" data-id="tfoot"
4-
:customAttributes="$this->getFooterTrAttributes($currentRows)"
4+
:customAttributes="$this->getFooterTrAttributes($this->getRows)"
55
wire:key="{{ $tableName .'-footer' }}"
66
>
77
@if ($showBulkActionsSections)
@@ -16,14 +16,14 @@
1616
@tableloop($selectedVisibleColumns as $colIndex => $column)
1717
@if($column->hasFooter() && $column->hasFooterCallback())
1818

19-
<x-livewire-tables::table.td.plain wire:key="{{ $tableName . '-footer-datatable-td-' . $column->getSlug() }}" :$column :$colIndex :customAttributes="$this->getFooterTdAttributes($column, $currentRows, $colIndex)">
19+
<x-livewire-tables::table.td.plain wire:key="{{ $tableName . '-footer-datatable-td-' . $column->getSlug() }}" :$column :$colIndex :customAttributes="$this->getFooterTdAttributes($column, $this->getRows, $colIndex)">
2020

2121
@if($column->footerCallbackIsFilter())
2222
{{ $column->getFooterFilter($column->getFooterCallback(), $filterGenericData) }}
2323
@elseif($column->footerCallbackIsString())
2424
{{ $column->getFooterFilter($this->getFilterByKey($column->getFooterCallback()), $filterGenericData) }}
2525
@else
26-
{{ $column->getNewFooterContents($currentRows) }}
26+
{{ $column->getNewFooterContents($this->getRows) }}
2727
@endif
2828
</x-livewire-tables::table.td.plain>
2929
@else

resources/views/components/thead/tr/header-titles.blade.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@aware(['tableName','isTailwind', 'isTailwind4', 'isBootstrap', 'currentlyReorderingStatus', 'showBulkActionsSections', 'showCollapsingColumnSections','selectedVisibleColumns', 'currentRows'])
1+
@aware(['tableName','isTailwind', 'isTailwind4', 'isBootstrap', 'currentlyReorderingStatus', 'showBulkActionsSections', 'showCollapsingColumnSections','selectedVisibleColumns'])
22

33
<x-livewire-tables::table.tr.plain :rowIndex="-1" data-id="thead"
4-
:customAttributes="$this->getHeaderTrAttributes($currentRows)"
4+
:customAttributes="$this->getHeaderTrAttributes($this->getRows)"
55
wire:key="{{ $tableName .'-header' }}"
66
>
77
@if($currentlyReorderingStatus)

resources/views/components/thead/tr/secondary-header.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
@aware([ 'tableName','showBulkActionsSections', 'selectedVisibleColumns', 'hasCollapsingColumns', 'filterGenericData', 'currentRows'])
1+
@aware([ 'tableName','showBulkActionsSections', 'selectedVisibleColumns', 'hasCollapsingColumns', 'filterGenericData'])
22

33
<x-livewire-tables::table.tr.plain :rowIndex="-1"
4-
:customAttributes="$this->getSecondaryHeaderTrAttributes($currentRows)"
4+
:customAttributes="$this->getSecondaryHeaderTrAttributes($this->getRows)"
55
wire:key="{{ $tableName .'-secondary-header' }}" data-id="temp"
66
>
77
@if ($showBulkActionsSections)
@@ -14,13 +14,13 @@
1414

1515
@tableloop($selectedVisibleColumns as $colIndex => $column)
1616
@if($column->hasSecondaryHeader() && $column->hasSecondaryHeaderCallback())
17-
<x-livewire-tables::table.td.plain wire:key="{{ $tableName . '-secondary-header-datatable-td-' . $column->getSlug() }}" :$column :$colIndex :customAttributes="$this->getSecondaryHeaderTdAttributes($column, $currentRows, $colIndex)">
17+
<x-livewire-tables::table.td.plain wire:key="{{ $tableName . '-secondary-header-datatable-td-' . $column->getSlug() }}" :$column :$colIndex :customAttributes="$this->getSecondaryHeaderTdAttributes($column, $this->getRows, $colIndex)">
1818
@if( $column->secondaryHeaderCallbackIsFilter())
1919
{{ $column->getSecondaryHeaderFilter($column->getSecondaryHeaderCallback(), $filterGenericData) }}
2020
@elseif($column->secondaryHeaderCallbackIsString())
2121
{{ $column->getSecondaryHeaderFilter($this->getFilterByKey($column->getSecondaryHeaderCallback()), $filterGenericData) }}
2222
@else
23-
{{ $column->getNewSecondaryHeaderContents($currentRows) }}
23+
{{ $column->getNewSecondaryHeaderContents($this->getRows) }}
2424
@endif
2525
</x-livewire-tables::table.td.plain>
2626
@else

resources/views/components/tools/toolbar/toolbar.blade.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,15 @@
5858
>
5959
@includeWhen($this->hasConfigurableAreaFor('toolbar-right-start'), $this->getConfigurableAreaFor('toolbar-right-start'), $this->getParametersForConfigurableArea('toolbar-right-start'))
6060

61-
@if($this->showActionsInToolbarRight())
62-
<x-livewire-tables::includes.actions/>
63-
@endif
6461

6562
@if ($this->showBulkActionsDropdownAlpine() && $this->shouldAlwaysHideBulkActionsDropdownOption != true)
6663
<x-livewire-tables::tools.toolbar.items.bulk-actions />
6764
@endif
6865

66+
@if($this->showActionsInToolbarRight())
67+
<x-livewire-tables::includes.actions/>
68+
@endif
69+
6970
@if ($this->columnSelectIsEnabled())
7071
<x-livewire-tables::tools.toolbar.items.column-select />
7172
@endif

resources/views/datatable.blade.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@
3232

3333
@endif
3434

35-
@php($currentRows = isset($rows) ? $rows : $this->getRows)
36-
3735
<x-livewire-tables::table.wrapper>
38-
<x-livewire-tables::table :$bulkActionsTdAttributes :$bulkActionsTdCheckboxAttributes :$currentRows />
36+
<x-livewire-tables::table :$bulkActionsTdAttributes :$bulkActionsTdCheckboxAttributes />
3937
</x-livewire-tables::table.wrapper>
4038

41-
<x-livewire-tables::pagination :$currentRows />
39+
<x-livewire-tables::pagination />
4240

4341
@includeIf($customView)
4442

0 commit comments

Comments
 (0)