From 7b4bd241a40de449d95ff49593ac776908b141ce Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Sat, 29 Jul 2023 12:16:20 +0100 Subject: [PATCH] wip --- packages/widgets/docs/02-stats-overview.md | 10 ++++++++++ packages/widgets/docs/03-charts.md | 10 ++++++++++ 2 files changed, 20 insertions(+) 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; +```