Skip to content

Commit

Permalink
Update Select.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dash8x authored Mar 9, 2024
1 parent c53875e commit 75f83b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Views/Components/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct(
}

if ($default instanceof Model) {
$default = $default->getKey();
$default = $idField ? $default->{$idField} : $default->getKey();
}

$this->selectedKey = old($inputName, $default);
Expand Down

0 comments on commit 75f83b7

Please sign in to comment.