mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
fix dependent fields
This commit is contained in:
@@ -10,7 +10,7 @@ trait CanBeDependentOnResourceRecord
|
||||
if (! $callback) {
|
||||
$this->hidden();
|
||||
|
||||
$callback = fn ($component) => $component->visible();
|
||||
$callback = fn ($component, $record) => $component->visible();
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -20,7 +20,7 @@ trait CanBeDependentOnResourceRecord
|
||||
}
|
||||
|
||||
if ($shouldExecuteCallback) {
|
||||
$callback($this);
|
||||
$callback($this, (object) $this->getLivewire()->record);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user