Merge branch '3.x' into 4.x

This commit is contained in:
Dan Harrin
2025-09-16 20:06:20 +01:00
+5 -4
View File
@@ -8,6 +8,7 @@ use Carbon\CarbonInterface;
use Closure;
use Filament\Support\Components\Component;
use Filament\Support\Contracts\HasLabel as LabelInterface;
use Filament\Tables\Table;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Model;
@@ -35,7 +36,7 @@ class Group extends Component
protected ?Closure $scopeQueryByKeyUsing = null;
protected string | Closure | null $label = null;
protected string | Htmlable | Closure | null $label = null;
protected string $id;
@@ -88,7 +89,7 @@ class Group extends Component
return $this;
}
public function label(string | Closure | null $label): static
public function label(string | Htmlable | Closure | null $label): static
{
$this->label = $label;
@@ -181,7 +182,7 @@ class Group extends Component
return $this->id;
}
public function getLabel(): string
public function getLabel(): string | Htmlable
{
return $this->evaluate($this->label) ?? (string) str($this->getId())
->beforeLast('.')
@@ -191,7 +192,7 @@ class Group extends Component
->ucfirst();
}
public function getDescription(Model $record, ?string $title): ?string
public function getDescription(Model $record, string | Htmlable | null $title): string | Htmlable | null
{
if (! $this->getDescriptionFromRecordUsing) {
return null;