VR
Edit resource not saving with custom livewire table component in tabs
Hi guys, I will post here the answer for the issue in case somebody else have the same issue.
Adding lazy load on load it seems that fixes the issue https://livewire.laravel.com/docs/lazy#lazy-loading-outside-of-the-viewport
4 replies
Table actions on demand
We can not yet... we plan that for next year because we need to upgrade also the livewire version 🙂
Yes, I agree with that, but still something not right.
We build a wrapper around the actions, to require the actions on demand and the difference on the same server is large. Like with normal filament action behavior, the loading time is around 8-10 seconds, and with the actions loaded on demand is under 2 sec.
15 replies
Table actions on demand
I discovered that if I remove the
->action()
function from the action itself, the actions are rendering fast, so conditions are not a problem. Is that an expected behavior? is there any other official way to call some functions without the ->action()
function?
Because if I remove the ->action()
function then the form builder or requireCOnfirmation
does not work at all.15 replies
Table actions on demand
is not that is making lots of trips to the server.... the main issue for me is that for each record I have 10-15 actions, and each action has at least 1-2 permissions (which are cached) check and also some status check. The client wants to have at least 100 records per page. Doing all that logic on the first iteration adds 30% to the loading time. I was thinking if there was a way to load the actions on demand: Like creating a column named
actions
with a button in it, and click to render the logic for that record and show the available actions only for that record.15 replies
Table actions on demand
I'm using direct
TableResource
protected function getTableQuery(): \Illuminate\Database\Eloquent\Builder
{
return Model::query();
}
protected function getTableActions(): array
{
return [
Tables\Actions\ActionGroup::make([
Action::make('debug')...
->visible(fn($record): bool => in_array($record->status, [STATUS::STATUS]) && $this->hasPermissionTo(Permissions::PERMISSION))
]);
];
}
The problem is that I have a lot of conditions for showing the action or not, conditions to create url, permissions check, and so on... and that adds loading time when having 500k records.15 replies