Open
Description
Package
filament/filament
Package Version
latest
Laravel Version
latest
Livewire Version
latest
PHP Version
latest
Problem description
When using callable to evaluate disabled()
as shown below, and the callable evaluates to false, the column fails to save to db. I guess same applies to hidden()
, too.
Forms\Components\Toggle::make('is_boss')
->disabled(fn($state) => $state)
->required()
Expected behavior
If the callable provided to disable()
evaluates to false, the record should be persisted to the database.
Steps to reproduce
- create a resource
- for one of the columns of the resource, use a callable for
disable()
as shown in the snippet below - ensure that the callable evaluates to
false
so that the value is editable from the UI - edit the value from the UI
- observe that when you save, the column reverts back to what is was
Forms\Components\Toggle::make('is_boss')
->disabled(fn($state) => $state)
->required()
Reproduction repository (issue will be closed if this is not valid)
https://github.com/damms005/filament-issue/tree/bug/disabled-columns
Relevant log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo