F
Filament16mo ago
alcmz

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
Saade16mo ago
make sure config.tables.dark_mode is enabled
alcmz
alcmzOP16mo 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
alcmzOP16mo ago
found this on the #chat , but nothing works though
alcmz
alcmzOP16mo 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
alcmz16mo ago
Dan Harrin
Dan Harrin16mo ago
are you really on v3? v3 doesnt have dark mode config like this
alcmz
alcmzOP16mo ago
No sir is V2 as i tagged on this post
Dan Harrin
Dan Harrin16mo ago
oh ok
alcmz
alcmzOP16mo ago
I'm not sure about v3 as it still early . Shall i upgrade it ?
Dan Harrin
Dan Harrin16mo ago
no its ok
alcmz
alcmzOP16mo ago
thanks!
Dan Harrin
Dan Harrin16mo ago
you dont need to
Want results from more Discord servers?
Add your server