Closed vv-ac closed 2 years ago
Please check if #2410 fixes this.
Hi, thanks for coming up with a fix (in such a short time). How do I require a specific PR to be included? It's rather a branch to be included right? If so which is it?
Thank you!
You can follow the Contributing guide in the README to set up a local version of the codebase, you can use the branch associated with that PR for testing.
I do believe I have fixed your issue though, so the PR is going to be merged. Let me know if that's not the case.
I just updated to v2.12.8 and still have the same issue, here is the entire code after removing most of the content (other forms, form content etc.) from it:
<?php
namespace App\Filament\Resources\AssessmentResource\Pages;
use App\Filament\Resources\AssessmentResource;
use Filament\Resources\Pages\Page;
use Illuminate\Database\Eloquent\Model;
use App\Models\Assessment;
use App\Models\AssessmentRequirement;
use Illuminate\Database\Eloquent\Builder;
use Carbon\Carbon;
use Closure;
use Filament\Tables;
// use Filament\Tables\Columns\TextColumn;
use Filament\Forms;
use Filament\Pages\Actions\ButtonAction;
class ManageAssessment extends Page implements Tables\Contracts\HasTable
{
protected static string $view = 'filament.resources.assessment-resource.pages.manage-assessment';
protected static string $resource = AssessmentResource::class;
protected static ?string $model = Assessment::class;
public $record;
public function mount(Assessment $record)
{
$this->record = $record;
$this->requirementsForm->fill([
//
]);
}
protected function getForms(): array
{
return [
'requirementsForm' => $this->makeForm()
->schema($this->getRequirementsFormSchema())
->model($this->record),
];
}
protected function getRequirementsFormSchema(): array
{
return [
Grid::make([
'default' => '1',
])
->schema([
Placeholder::make('')
->content(new HTMLString('blablabla.')),
]),
];
}
use Tables\Concerns\InteractsWithTable;
protected function getTableQuery(): Builder
{
return AssessmentRequirement::query();
}
}
It still returns
Typed property App\Filament\Resources\AssessmentResource\Pages\ManageAssessment::$cachedTableFilters must not be accessed before initialization
It's not been released yet
Works!
Package
filament/tables
Package Version
v2.12.2
Laravel Version
v9.12.0
Livewire Version
v2.10.5
PHP Version
PHP 8.1.4
Bug description
When adding a table to a custom page with minimum options the following happens:
Steps to reproduce
Using a custom page that holds multiple forms. Now we add a table in there. Using the following excerpt:
In the respective blade the follwing is inserted:
Now refreshing the page leads to the mentioned error message above.
Relevant log output
No response