mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
refactor: rename collapsible to isCollapsible and make non-nullable with false default
This commit is contained in:
@@ -184,10 +184,10 @@ protected ?string $maxHeight = '300px';
|
||||
|
||||
## Making the chart collapsible
|
||||
|
||||
You may enable the chart to be collapsible by setting the `$collapsible` property:
|
||||
You may enable the chart to be collapsible by setting the `$isCollapsible` property:
|
||||
|
||||
```php
|
||||
protected ?bool $collapsible = true;
|
||||
protected ?bool $isCollapsible = true;
|
||||
```
|
||||
|
||||
## Setting chart configuration options
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
$heading = $this->getHeading();
|
||||
$description = $this->getDescription();
|
||||
$filters = $this->getFilters();
|
||||
$isCollapsible = $this->getCollapsible();
|
||||
$isCollapsible = $this->isCollapsible();
|
||||
@endphp
|
||||
|
||||
<x-filament-widgets::widget class="fi-wi-chart">
|
||||
|
||||
@@ -36,7 +36,7 @@ abstract class ChartWidget extends Widget implements HasSchemas
|
||||
*/
|
||||
protected ?array $options = null;
|
||||
|
||||
protected ?bool $collapsible = true;
|
||||
protected bool $isCollapsible = false;
|
||||
|
||||
/**
|
||||
* @var view-string
|
||||
@@ -127,8 +127,8 @@ abstract class ChartWidget extends Widget implements HasSchemas
|
||||
return $this->color;
|
||||
}
|
||||
|
||||
public function getCollapsible(): ?bool
|
||||
public function isCollapsible(): bool
|
||||
{
|
||||
return $this->collapsible ?? false;
|
||||
return $this->isCollapsible;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user