mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
wip
This commit is contained in:
@@ -72,8 +72,8 @@
|
||||
:grouped="filled($label)"
|
||||
:icon="$item->getIcon()"
|
||||
:last="$loop->last"
|
||||
:should-open-url-in-new-tab="$item->shouldOpenUrlInNewTab()"
|
||||
:url="$item->getUrl()"
|
||||
:should-open-url-in-new-tab="$item->shouldOpenUrlInNewTab()"
|
||||
>
|
||||
{{ $item->getLabel() }}
|
||||
</x-filament-panels::sidebar.item>
|
||||
|
||||
@@ -78,7 +78,6 @@ class MenuItem extends Component
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function openUrlInNewTab(bool | Closure $condition = true): static
|
||||
{
|
||||
$this->shouldOpenUrlInNewTab = $condition;
|
||||
@@ -86,7 +85,6 @@ class MenuItem extends Component
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
public function hidden(bool | Closure $condition = true): static
|
||||
{
|
||||
$this->isHidden = $condition;
|
||||
@@ -143,7 +141,6 @@ class MenuItem extends Component
|
||||
return $this->evaluate($this->url);
|
||||
}
|
||||
|
||||
|
||||
public function shouldOpenUrlInNewTab(): bool
|
||||
{
|
||||
return (bool) $this->evaluate($this->shouldOpenUrlInNewTab);
|
||||
|
||||
@@ -125,7 +125,7 @@ class NavigationItem extends Component
|
||||
|
||||
public function url(string | Closure | null $url, bool | Closure $shouldOpenInNewTab = false): static
|
||||
{
|
||||
$this->shouldOpenUrlInNewTab = $shouldOpenInNewTab;
|
||||
$this->openUrlInNewTab($shouldOpenInNewTab);
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
|
||||
@@ -146,7 +146,7 @@ class Stat extends Component implements Htmlable
|
||||
|
||||
public function url(?string $url, bool $shouldOpenInNewTab = false): static
|
||||
{
|
||||
$this->shouldOpenUrlInNewTab = $shouldOpenInNewTab;
|
||||
$this->openUrlInNewTab($shouldOpenInNewTab);
|
||||
$this->url = $url;
|
||||
|
||||
return $this;
|
||||
|
||||
Reference in New Issue
Block a user