ArnoNym
ArnoNym
FFilament
Created by ArnoNym on 7/3/2024 in #❓┊help
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
7 replies
FFilament
Created by ArnoNym on 6/12/2024 in #❓┊help
Build Link to (Url for) table with set filters
Hey ho I have a table with filters in a complex structure like this:
return $table
->query(Model::query())
->filters([
Filter::make('exampleFilters')
->form([
Tabs::make('Heading')
->tabs([
Tabs\Tab::make(basicFilters)
->schema(FilterTabs::listBasicFilter()),
return $table
->query(Model::query())
->filters([
Filter::make('exampleFilters')
->form([
Tabs::make('Heading')
->tabs([
Tabs\Tab::make(basicFilters)
->schema(FilterTabs::listBasicFilter()),
Inside listBasicFilter the following is returned:
return [
Grid::make([
'sm' => 1,
'md' => 2,
])
->schema([
Grid::make(2)
->columnSpan(1)
->columns(['default' => 2, 'md' => 2, 'lg' => 2])
->schema([
Select::make('OtherModel_id')
->hiddenLabel()
->reactive()
}),
return [
Grid::make([
'sm' => 1,
'md' => 2,
])
->schema([
Grid::make(2)
->columnSpan(1)
->columns(['default' => 2, 'md' => 2, 'lg' => 2])
->schema([
Select::make('OtherModel_id')
->hiddenLabel()
->reactive()
}),
After setting a Filter (OtherModel_id) the query is updated within:
->query(fn ($query, $data) => FilterTabs::listQueryFunction($query, $data))
->query(fn ($query, $data) => FilterTabs::listQueryFunction($query, $data))
listQueryFunction than returns:
if (!empty($data['OtherModel_id'])) {
$query->where('otherModel_id',$data['OtherModel_id']);
if (!empty($data['OtherModel_id'])) {
$query->where('otherModel_id',$data['OtherModel_id']);
Now i want to build a link to this table with a preset filter. I alredy tried:
list?exampleFilters[OtherModel_id][values][0]=220
list?exampleFilters[OtherModel_id][values][0]=220
(220 is the id of a specific OtherModel) This is linking to the list but the filter is not set. Does sombody know how to build a link to this list with a preset filter? Thanks alot in advance
5 replies
FFilament
Created by ArnoNym on 3/1/2024 in #❓┊help
Usage of Filament input Component/select with searchable and multiple inside blade
No description
10 replies
FFilament
Created by ArnoNym on 1/26/2024 in #❓┊help
Table Filter columns on mobile device
Hello Filament Team and supporters I try to build table filters with ->filtersFormColumns( 2 ) which works fine in the web view. But in the mobile view the filters are still shown in one column even if there is enough space for more columns. Does someone know how to prevent that behaviour or how to force the filter to an amound of columns even in mobile view? Thanks in advance
4 replies
FFilament
Created by ArnoNym on 12/19/2023 in #❓┊help
HeaderActions in Component (not Resource)
No description
12 replies
FFilament
Created by ArnoNym on 11/28/2023 in #❓┊help
Filament V3 Table heading in one row with the filters
No description
7 replies