Skip to content

Commit caf0e3f

Browse files
authored
fix: maintain the backward compatibility (#14)
1 parent 381981b commit caf0e3f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Concerns/HasSelectableValues.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ protected function selectableValuesFormFields(string $type, string $label, strin
143143
'array' => __('Array'),
144144
'relationship' => __('Relationship'),
145145
])
146+
->afterStateHydrated(function (Forms\Get $get, Forms\Set $set) use ($type) {
147+
$value = $get("config.{$type}");
148+
if (is_string($value)) {
149+
$set("config.{$type}", [$value]);
150+
}
151+
})
146152
->label(__('Type'))
147153
->live(),
148154
// Array options

0 commit comments

Comments
 (0)