Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
danharrin committed Oct 29, 2023
1 parent 1801f08 commit f42820d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/tables/src/Filters/Indicator.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ class Indicator extends Component

protected bool | Closure $isRemovable = true;

protected string | Closure | null $label = null;
protected string | Closure $label;

protected string | Closure | null $removeField = null;

protected string | Closure | null $removeLivewireClickHandler = null;

public function __construct(string $label)
protected string $evaluationIdentifier = 'indicator';

public function __construct(string | Closure $label)
{
$this->label($label);
}

public static function make(string | Closure | null $label = null): static
public static function make(string | Closure $label): static
{
return app(static::class, ['label' => $label]);
}

public function label(string $label): static
public function label(string | Closure $label): static
{
$this->label = $label;

Expand All @@ -37,7 +39,7 @@ public function label(string $label): static

public function getLabel(): string
{
return $this->label;
return $this->evaluate($this->label);
}

public function removable(bool | Closure $condition = true): static
Expand Down

0 comments on commit f42820d

Please sign in to comment.