diff --git a/packages/widgets/docs/02-stats-overview.md b/packages/widgets/docs/02-stats-overview.md index 485f76ca2c..d257a1b70d 100644 --- a/packages/widgets/docs/02-stats-overview.md +++ b/packages/widgets/docs/02-stats-overview.md @@ -134,3 +134,13 @@ Alternatively, you may disable polling altogether: ```php protected static ?string $pollingInterval = null; ``` + +## Disabling lazy loading + +By default, widgets are lazy loaded. This means that they will only be loaded when they are visible on the page. + +To disable this behaviour, you may override the `$isLazy` property on the widget class: + +```php +protected static bool $isLazy = true; +``` diff --git a/packages/widgets/docs/03-charts.md b/packages/widgets/docs/03-charts.md index 966dc1ac1d..1aac121628 100644 --- a/packages/widgets/docs/03-charts.md +++ b/packages/widgets/docs/03-charts.md @@ -240,3 +240,13 @@ public function getDescription(): ?string return 'The number of blog posts published per month.'; } ``` + +## Disabling lazy loading + +By default, widgets are lazy loaded. This means that they will only be loaded when they are visible on the page. + +To disable this behaviour, you may override the `$isLazy` property on the widget class: + +```php +protected static bool $isLazy = true; +```