F
Filamentβ€’2y ago
Zerosan

Pagination missing on large display, visible on small

Hello, I'm having trouble with the pagination under the table not being visible when I have my application in fullscreen. I've inspected the resulting code and it seems like pagination has the hidden attribute for no particular reason that I can tell.
4 Replies
Zerosan
ZerosanOPβ€’2y ago
<?php

namespace App\Http\Livewire;

use App\Models\Machine;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\Relation;
use Livewire\Component;

class ListMachines extends Component implements HasTable
{
use InteractsWithTable;

protected function getTableQuery(): Builder|Relation
{
return Machine::query()->with(['customer', 'modelname']);
}

protected function getTableColumns(): array
{
return [
TextColumn::make('id')->sortable(),
TextColumn::make('inventory_number')->sortable()->searchable(),
TextColumn::make('modelname.name')->sortable()->searchable(),
TextColumn::make('installation_date')->sortable(),
TextColumn::make('customer_name')->sortable()->searchable(),
TextColumn::make('location_address')->sortable(),
IconColumn::make('service_contract')->boolean()
->trueColor('green')
->falseColor('red'),
TextColumn::make('notes')->searchable()
];
}


public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
{
return view('livewire.list-machines');
}
}
<?php

namespace App\Http\Livewire;

use App\Models\Machine;
use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\Relation;
use Livewire\Component;

class ListMachines extends Component implements HasTable
{
use InteractsWithTable;

protected function getTableQuery(): Builder|Relation
{
return Machine::query()->with(['customer', 'modelname']);
}

protected function getTableColumns(): array
{
return [
TextColumn::make('id')->sortable(),
TextColumn::make('inventory_number')->sortable()->searchable(),
TextColumn::make('modelname.name')->sortable()->searchable(),
TextColumn::make('installation_date')->sortable(),
TextColumn::make('customer_name')->sortable()->searchable(),
TextColumn::make('location_address')->sortable(),
IconColumn::make('service_contract')->boolean()
->trueColor('green')
->falseColor('red'),
TextColumn::make('notes')->searchable()
];
}


public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|\Illuminate\Contracts\Foundation\Application
{
return view('livewire.list-machines');
}
}
Zerosan
ZerosanOPβ€’2y ago
And here is a snippet of the pagination segment under the table
Zerosan
ZerosanOPβ€’2y ago
When I remove the hidden class, it still displays like this:
Zerosan
ZerosanOPβ€’2y ago
Now all works, I'm a fool, did not add "'./vendor/filament/*/.blade.php'," to tailwind.config.js 😐
Want results from more Discord servers?
Add your server