Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ViewComponentColumn - New method docs #1828

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [v3.4.3] - 2024-08-06
### Bug Fixes
- View component column fixes by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1825

## [v3.4.2] - 2024-08-04
### New Features
- Additional Events & Customisable Behaviour by @lrljoe in https://github.com/rappasoft/laravel-livewire-tables/pull/1820
Expand Down
12 changes: 12 additions & 0 deletions docs/column-types/view_component_column.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ ViewComponentColumn::make('E-mail', 'email')
]),
```

### customComponent

Should you wish to render the Custom Component in it's entirety, then you may use the customComponent method. Otherwise it will pass in the values directly to the blade, rather than executing your View Component.

```php
ViewComponentColumn::make('Weight', 'grams')
->customComponent(\App\View\Components\TestWeight::class)
->attributes(fn ($value, $row, Column $column) => [
'weight' => new Weight($value),
]),
```

Please also see the following for other available methods:
<ul>
<li>
Expand Down
Loading