We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c53875e commit 75f83b7Copy full SHA for 75f83b7
src/Views/Components/Select.php
@@ -75,7 +75,7 @@ public function __construct(
75
}
76
77
if ($default instanceof Model) {
78
- $default = $default->getKey();
+ $default = $idField ? $default->{$idField} : $default->getKey();
79
80
81
$this->selectedKey = old($inputName, $default);
0 commit comments