Set hasEmptyOption
This commit is contained in:
parent
fd1e0bb9e1
commit
daca017d96
|
@ -19,8 +19,8 @@ return new class extends Migration
|
||||||
/** @var Collection<int, mixed> */
|
/** @var Collection<int, mixed> */
|
||||||
$fields = $section->fields;
|
$fields = $section->fields;
|
||||||
$section->fields = collect($fields)->map(function ($field) {
|
$section->fields = collect($fields)->map(function ($field) {
|
||||||
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
|
if ($field->type === 'GroupField') {
|
||||||
$field->allowcustom = false;
|
$field->hasEmptyOption = false;
|
||||||
}
|
}
|
||||||
return $field;
|
return $field;
|
||||||
})->all();
|
})->all();
|
||||||
|
@ -36,8 +36,8 @@ return new class extends Migration
|
||||||
/** @var Collection<int, mixed> */
|
/** @var Collection<int, mixed> */
|
||||||
$fields = $section->fields;
|
$fields = $section->fields;
|
||||||
$section->fields = collect($fields)->map(function ($field) {
|
$section->fields = collect($fields)->map(function ($field) {
|
||||||
if ($field->type === 'DropdownField' || $field->type === 'RadioField') {
|
if ($field->type === 'GroupField') {
|
||||||
$field->allowcustom = false;
|
$field->hasEmptyOption = false;
|
||||||
}
|
}
|
||||||
return $field;
|
return $field;
|
||||||
})->all();
|
})->all();
|
||||||
|
|
Loading…
Reference in New Issue