-
|
Hello everyone, I upgraded to v3 but now I'm having lot's of trouble with refreshing my Relation Managers. If I update a record and the RelationManager is visible (ie: if I scrolled down enough for it to "initialize" I have no problems whatsoever). "Filament\Resources\RelationManagers\RelationManager::$table must not be accessed before initialization" Same happens If I trigger a custom action from the header of the View Page. Anyone experienced something similar? Thank you. PS: Here is my code: <?php
namespace App\Filament\Resources\OrderResource\Pages;
use App\Filament\Resources\OrderResource;
use Filament\Resources\Pages\EditRecord;
class EditOrder extends EditRecord
{
protected static string $resource = OrderResource::class;
protected function afterSave()
{
$this->dispatch('recordUpdated');
}
}<?php
namespace App\Filament\Resources\OrderResource\RelationManagers\InvoicesRelationManager;
use Filament\Resources\RelationManagers\RelationManager;
class InvoicesRelationManager extends RelationManager
{
protected $listeners = [
'recordUpdated' => '$refresh',
];
} |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I'm such an idiot, it's right there in the documentation: protected static bool $isLazy = false; |
Beta Was this translation helpful? Give feedback.
I'm such an idiot, it's right there in the documentation:
https://filamentphp.com/docs/3.x/panels/resources/relation-managers#disabling-lazy-loading