Skip to content

Commit cd723c1

Browse files
authored
Ensure HTML Columns Return HTML Correctly (#1737)
* Adjust for HTML Columns
1 parent d136b97 commit cd723c1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to `laravel-livewire-tables` will be documented in this file
44

5+
## [v3.2.7] - 2024-06-05
6+
### Bug Fixes
7+
- Ensure HTML Columns return HTML correctly by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1737
8+
59
## [v3.2.6] - 2024-06-05
610
### New Features
711
- Add configurable wire:model for filters by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1699

resources/views/datatable.blade.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@
5353
@continue($column->isReorderColumn() && !$this->getCurrentlyReorderingStatus() && $this->getHideReorderColumnUnlessReorderingStatus())
5454

5555
<x-livewire-tables::table.td wire:key="{{ $tableName . '-' . $row->{$this->getPrimaryKey()} . '-datatable-td-' . $column->getSlug() }}" :column="$column" :colIndex="$colIndex">
56-
{{ $column->renderContents($row) }}
56+
@if($column->isHtml())
57+
{!! $column->renderContents($row) !!}
58+
@else
59+
{{ $column->renderContents($row) }}
60+
@endif
5761
</x-livewire-tables::table.td>
5862
@endforeach
5963
</x-livewire-tables::table.tr>

src/LaravelLivewireTablesServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class LaravelLivewireTablesServiceProvider extends ServiceProvider
1414
public function boot(): void
1515
{
1616

17-
AboutCommand::add('Rappasoft Laravel Livewire Tables', fn () => ['Version' => '3.2.6']);
17+
AboutCommand::add('Rappasoft Laravel Livewire Tables', fn () => ['Version' => '3.2.7']);
1818

1919
$this->mergeConfigFrom(
2020
__DIR__.'/../config/livewire-tables.php', 'livewire-tables'

0 commit comments

Comments
 (0)