Defer Loading โ
Skip the datasource on first render. The table mounts empty, then wire:init calls fetchDatasource() and the rows load. This is not PowerGrid::lazy() (removed) and not Livewire's #[Lazy] attribute.
Enabling Defer Load โ
Set $deferLoading to true. Until fetchDatasource() runs, the body shows __('Loading'), or the view in $loadingComponent.
phpapp/Livewire/ProductTable.php
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
class ProductTable extends PowerGridComponent
{
public bool $deferLoading = true;
}phpapp/Livewire/ProductTable.php
use PowerComponents\LivewirePowerGrid\PowerGridComponent;
class ProductTable extends PowerGridComponent
{
public bool $deferLoading = true;
public string $loadingComponent = 'components.my-custom-loading';
}You may also disable the header Loading Icon with PowerGrid::header()->withoutLoading().
