Table Widget is not following with Dark Theme
Edited:
The getTableColumns that i made from on custom page isn't following the dark theme . Is there anything i should check?
this is the full code:
~~~
class ViewProductDetails extends Page implements Tables\Contracts\HasTable
{
use Tables\Concerns\InteractsWithTable;
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static ?string $title = 'View Product Details ';
protected static string $view = 'filament.pages.view-product-details';
protected function getHeaderWidgets(): array
{
return [
SingleProductOverview::class,
];
}
protected function getTableQuery(): Builder
{
$productId = request()->route('product');
return Tradingprofile::whereHas('product', function (Builder $query) use ($productId) {
$query->where('slug', $productId);
});
}
protected function getTableColumns(): array
{
return [
TextColumn::make('customer.name')->label('Customer Name')->searchable(),
TextColumn::make('customer.phone_number')->label('Phone Number')->openUrlInNewTab()->searchable(),
TextColumn::make('profile_name')->label('Profile Name')->searchable(),
TextColumn::make('user.name')->label('Person In Charge')->searchable(),
TextColumn::make('created_at')->date('d/m/Y')->searchable(),
];
}
protected static function shouldRegisterNavigation(): bool
{
return false;
}
protected function getTitle(): string
{
$productSlug = request()->route('product');
$productName = Product::where('slug', $productSlug)->pluck('name');
return 'View Product Details - ' . $productName;
}
}
```
12 Replies
make sure
config.tables.dark_mode
is enabledI have the dark_mode enabled in config file . But couldn't find config.tables.dark_mode . Is it inside the filament config file or other location?
@Dan Harrin I have opened it yesterday
found this on the #chat , but nothing works though
Got it Worked !
It seems like the command was wrong:
php artisan vendor:publish --tag=tables-config
then find the dark_mode => true
Solution
are you really on v3?
v3 doesnt have dark mode config like this
No sir is V2 as i tagged on this post
oh ok
I'm not sure about v3 as it still early . Shall i upgrade it ?
no its ok
thanks!
you dont need to