© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
6 replies
ArnoNym

Component as row in TableBuilder

I have a table with a custom View for the row as follows:
->columns([View::make('components.***')
                    ->components([
                        Tables\Columns\TextColumn::make('date')
                            ->searchable(),
                        Tables\Columns\TextColumn::make('a.name')
                            ->searchable(),
                        Tables\Columns\TextColumn::make('b.name')
                            ->searchable(),
                    ]),
->columns([View::make('components.***')
                    ->components([
                        Tables\Columns\TextColumn::make('date')
                            ->searchable(),
                        Tables\Columns\TextColumn::make('a.name')
                            ->searchable(),
                        Tables\Columns\TextColumn::make('b.name')
                            ->searchable(),
                    ]),

this renders the view correctly.
But this view is just one part of the component, there is also the
namespace App\Livewire;
use Livewire\Component;
class *** extends Component
{
public $propertyA = false;
public $propertyB = true;
namespace App\Livewire;
use Livewire\Component;
class *** extends Component
{
public $propertyA = false;
public $propertyB = true;

Because the filament table only renders the view and does not use the component the properties are not available inside the blade view.

It is working if i set the properties above the html code inside the blade view via:
@php
    if (!isset($propertyA)) {
        $propertyA= false;
    }
@endphp
<div x-data="{ original_text: false }" class="">
...
@php
    if (!isset($propertyA)) {
        $propertyA= false;
    }
@endphp
<div x-data="{ original_text: false }" class="">
...


But i would like to render the whole component as my table row because i am using this component also in other parts of my application with the properties inside the component and not the blade view.
Is that possible anyhow?

Thanks in advance
Solution
I think you can render the LW component in the view that you created

<div>
  <livewire::your-component />
  @livewire('your-component')
</div>
<div>
  <livewire::your-component />
  @livewire('your-component')
</div>
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

view for component [tablebuilder]`
FilamentFFilament / ❓┊help
3y ago
How i disabled the clickable row in TableBuilder
FilamentFFilament / ❓┊help
3y ago
TableBuilder from a Collection
FilamentFFilament / ❓┊help
3y ago
How to manage ManyToMany relation in TableBuilder and FormBuilder?
FilamentFFilament / ❓┊help
16mo ago