Skip to content

Commit

Permalink
Lazy Loading Fix (#1355)
Browse files Browse the repository at this point in the history
* Add fix for lazy loading

* Fix styling

---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Sep 17, 2023
1 parent 74b547c commit b68ab26
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to `laravel-livewire-tables` will be documented in this file
- Add documentation for setSearchPlaceholder()
- Fix for Bulk Actions dropdown not working in Bootstrap
- Fix for Column Select "Select All" not consistently updating
- Add fix for lazy loading of table

## [Unreleased] - 3.x (beta-0)
- Requirements Change
Expand Down
3 changes: 2 additions & 1 deletion resources/views/datatable.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@php($tableName = $this->getTableName())

<div>
<x-livewire-tables::wrapper :component="$this" :tableName="$tableName">
@if ($this->hasConfigurableAreaFor('before-tools'))
@include($this->getConfigurableAreaFor('before-tools'), $this->getParametersForConfigurableArea('before-tools'))
Expand Down Expand Up @@ -77,3 +77,4 @@

@includeIf($customView)
</x-livewire-tables::wrapper>
</div>
2 changes: 1 addition & 1 deletion src/Views/Columns/ComponentColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function getContents(Model $row): null|string|HtmlString|DataTableConfigu
throw new DataTableConfigurationException('You can not use a label column with a component column');
}

if (false === $this->hasComponentView()) {
if ($this->hasComponentView() === false) {
throw new DataTableConfigurationException('You must specify a component view for a component column');
}

Expand Down

0 comments on commit b68ab26

Please sign in to comment.