filament icon indicating copy to clipboard operation
filament copied to clipboard

RichEditor not expecting dot annotation names

Open iztok opened this issue 6 months ago • 1 comments

Package

filament/forms

Package Version

v4

Laravel Version

v12

Livewire Version

v3

PHP Version

8.4

Problem description

When using dot annotation for rich editor I get Undefined array key "content".

I also tried with statePath(), it was the same.

Example code:

Forms\Components\RichEditor::make('instructions.background')
    ->label(__('app.agent.tabs.instructions.background'))
    ->helperText(__('app.agent.tabs.instructions.background_helper_text'))
    ->columnSpanFull(),

Where instructions is a JSON column and I would like to store HTML in an array. It's cast as an array.

Works OK for Textarea or TextField.

Expected behavior

Works as expected for Textarea or TextField.

Steps to reproduce

Use dot annotation:

Forms\Components\RichEditor::make('instructions.background')
    ->label(__('app.agent.tabs.instructions.background'))
    ->helperText(__('app.agent.tabs.instructions.background_helper_text'))
    ->columnSpanFull(),

Reproduction repository (issue will be closed if this is not valid)

https://github.com/iztok/f4-ai/tree/main

Link to file: https://github.com/iztok/f4-ai/blob/main/app/Filament/Resources/Agents/Schemas/AgentForm.php#L37

Relevant log output


iztok avatar Jun 11 '25 14:06 iztok

Hey @iztok! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

github-actions[bot] avatar Jun 11 '25 14:06 github-actions[bot]

@iztok I can't seem to download the repository because of a local google-search-api I am missing. Can you double check this is still an issue, as I can't reproduce it on the Filament demo at the moment.

danharrin avatar Jul 14 '25 09:07 danharrin

Let me know if its still a problem and I'll reopen

danharrin avatar Jul 20 '25 19:07 danharrin