F
Filament•4w ago
Mitsunari

Bug: Multiple RichEditors inside a Repeater cause $rawState type error

Hi everyone 👋, I’ve been running into a consistent issue when using more than one RichEditor inside the same Repeater item (Filament v4). What happens • If there is only one RichEditor in the repeater → everything works fine. • As soon as I add a second RichEditor (e.g. activities and description), I start getting the following error on save: Filament\Forms\Components\RichEditor::Filament\Forms\Components{closure}(): Argument #2 ($rawState) must be of type ?array, string given, called in /vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 36 It seems to happen because the Repeater is sometimes passing a string instead of an array as $rawState to the RichEditor’s closure. I have tried: • Using ->json() mode with proper casts. • Using longText (HTML string) mode. • Wrapping editors in Fieldset / Group. • Adding mutateDehydratedStateUsing fallbacks. But the error still occurs as long as there are multiple RichEditors within the same repeater item. Multiple RichEditors inside the same Repeater item should work consistently without $rawState type errors. Has anyone else experienced this? Is this a known bug in v4, or is there a recommended workaround other than limiting each repeater item to a single RichEditor? Thanks a lot 🙏
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?