Description
Package
filament/forms
Package Version
v3.3.0
Laravel Version
v12.0.0 (Also with v11)
Livewire Version
No response
PHP Version
8.2
Problem description
FileUpload does not react to disabled() although it does to hidden()
I've setup a small app that adds 'photo' and 'enable_photo' attributes to the User model.
Inside the Form from the UserResource I've added two FileUpload components. Both use the 'enable_photo' to check whether or not enable/hide the Component.
Expected behavior
When the 'enable photo' Toggle is toggled, only the FileUpload with the hidden() reacts to the value change of the Toggle (which has live(onBlur: true)).
If the default value in the User model is set to 'false' the first load of the form is correct. When 'enable_photo' is set to 0, the first FileUpload appears disabled and the second one is hidden. If 'enable_photo' is set to 1, both FileUpload appears enabled. When the Toggle is toggled, only the FileUpload with the hidden() reacts.
Steps to reproduce
Select Users, click on the toggle 'Enable photo'
Screen.Recording.2025-02-25.at.18.04.21.mov
Reproduction repository (issue will be closed if this is not valid)
https://github.com/juanborras/fileupload-test.git
Relevant log output
commited with sqlite db. User [email protected], pass user
Metadata
Metadata
Assignees
Labels
Type
Projects
Status