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
Saade
Saade2y ago
make sure config.tables.dark_mode is enabled
alcmz
alcmzOP2y ago
I 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
alcmz
alcmzOP2y ago
found this on the #chat , but nothing works though
alcmz
alcmzOP2y ago
Got it Worked ! It seems like the command was wrong: php artisan vendor:publish --tag=tables-config then find the dark_mode => true
Solution
alcmz
alcmz2y ago
Dan Harrin
Dan Harrin2y ago
are you really on v3? v3 doesnt have dark mode config like this
alcmz
alcmzOP2y ago
No sir is V2 as i tagged on this post
Dan Harrin
Dan Harrin2y ago
oh ok
alcmz
alcmzOP2y ago
I'm not sure about v3 as it still early . Shall i upgrade it ?
Dan Harrin
Dan Harrin2y ago
no its ok
alcmz
alcmzOP2y ago
thanks!
Dan Harrin
Dan Harrin2y ago
you dont need to

Did you find this page helpful?