Skip to content

Fix attribute fieldtypes in 1.5#2416

Open
ryanmitchell wants to merge 3 commits intolunarphp:1.xfrom
ryanmitchell:fix/1.5-rich-text
Open

Fix attribute fieldtypes in 1.5#2416
ryanmitchell wants to merge 3 commits intolunarphp:1.xfrom
ryanmitchell:fix/1.5-rich-text

Conversation

@ryanmitchell
Copy link
Copy Markdown
Contributor

formatStateUsing in Filament 4 is implemented as afterStateHydrated(fn => $component->state($callback())), and state() re-runs all state casts on whatever the callback returns.

So when Text('')->getValue() returned "", RichEditorStateCast::set("") was called and DOMParser crashed on the emptystring.

This PR fixes that by ensuring we pass null, not ''

@ryanmitchell ryanmitchell changed the title Fix blank RichText fields in 1.5 Fix attribute fieldtypes in 1.5 Mar 9, 2026
@glennjacobs glennjacobs added the admin panel Improvements or additions to admin panel label Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

admin panel Improvements or additions to admin panel

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants