Skip to content

Fix attribute fieldtypes in 1.5#2416

Merged
alecritson merged 5 commits intolunarphp:1.xfrom
ryanmitchell:fix/1.5-rich-text
Apr 10, 2026
Merged

Fix attribute fieldtypes in 1.5#2416
alecritson merged 5 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
@alecritson alecritson requested a review from glennjacobs April 10, 2026 10:51
@alecritson alecritson merged commit 97469ed into lunarphp:1.x Apr 10, 2026
44 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Apr 10, 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: Done

Development

Successfully merging this pull request may close these issues.

3 participants