close #2718 #2709 Fixed Country field edit selected value issue..

This commit is contained in:
Cüneyt Şentürk 2022-11-03 11:06:45 +03:00
parent 2b8dcf4529
commit daa76f2d98
2 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,14 @@ class Country extends Form
*/
public function render()
{
if (empty($this->name)) {
$this->name = 'country';
}
if (empty($this->selected) && empty($this->getParentData('model'))) {
$this->selected = setting('company.country');
}
return view('components.form.group.country');
}
}

View File

@ -2,7 +2,7 @@
name="country"
label="{!! trans_choice('general.countries', 1) !!}"
:options="trans('countries')"
:selected="setting('company.country')"
:selected="$selected"
required="{{ $required }}"
not-required="{{ $notRequired }}"
model="form.country"