From d4f3092fe55945e6cff583c4e610dfa70bf554e4 Mon Sep 17 00:00:00 2001 From: Ash Monsh Date: Sat, 14 Oct 2023 00:47:11 +0300 Subject: [PATCH] check if options is string --- src/Fields/FieldsContract.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Fields/FieldsContract.php b/src/Fields/FieldsContract.php index 15adfd3e..6594bc1a 100644 --- a/src/Fields/FieldsContract.php +++ b/src/Fields/FieldsContract.php @@ -57,6 +57,10 @@ public function getResponse(Field $field, FieldResponse $resp): string // @phpstan-ignore-next-line public function appendFilamentComponentsOptions($component, $zeusField) { + if (is_string($zeusField->options)) { + $zeusField->options = json_decode($zeusField->options, true); + } + $htmlId = $zeusField->options['htmlId'] ?? str()->random(6); $component