azeddine_hf
azeddine_hf
FFilament
Created by azeddine_hf on 3/2/2024 in #❓┊help
How to Colorize Table Rows Conditionally ! :fi:
i'm using plugin auto panel and idk how to colorize table rows conditionally ?
4 replies
FFilament
Created by azeddine_hf on 3/1/2024 in #❓┊help
Using Plugin Auto Panel How to Colorize Table Rows Conditionally
the uplugin gives us this func to overide the columns and forms and infolist : public static function getColumnsOverwrite(): array { return [ 'table' => [ Tables\Columns\TextColumn::make('category_id')->label('categorys') ->searchable() ->getStateUsing(function (Post $record) { return $record->category->name; }), Tables\Columns\ImageColumn::make('thumbnail')->circular(), Tables\Columns\ColorColumn::make('color'), ], 'form' => [ // // Forms\Components\ColorPicker::make('color')->required(), ], 'infolist' => [ // Forms\Components\ColorPicker::make('color'), // Tables\Columns\ColorColumn::make('color'), Infolists\Components\ColorEntry::make('color'), Infolists\Components\ImageEntry::make('thumbnail'), Infolists\Components\TextEntry::make('category_id')->label('famillies')->getStateUsing(function (Post $record) { return $record->category->name; }), ], ]; } but i don't know how to colorize the table rows conditionnaly ?
2 replies