-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Open
Copy link
Labels
Milestone
Description
Package
filament/filament
Package Version
v4.0.0pa l
Laravel Version
v12
Livewire Version
v3
PHP Version
8.4.11
Problem description
If you use ->default() on a Text Entry (maybe other components) on a create form, it raises an exception of 'Schema has no [record()] or [state()] set.' using ->state works fine.
TextEntry::make('name') ->hiddenLabel() ->size(TextSize::Large) ->weight(FontWeight::SemiBold) // ->state(fn($record) => $record?->name ?? '---'), ->default('New Company'),
Expected behavior
It should use the value of ->default() like it does it you use ->state
Steps to reproduce
Place a TextEntry component in the $schema and add ->default('')
Reproduction repository (issue will be closed if this is not valid)
https://github.com/iamgmd/bug-filament-default-issue.git
Relevant log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo