Closed wxfjamdc closed 1 year ago
If you could help us by attempting a PR, that would be great!
This is issue has been also mention here https://github.com/livewire/livewire/discussions/6801 on livewire repository
So this is a Livewire issue? If so, someone should attempt a failing test PR to the Livewire repo. Otherwise it won't be fixed there.
I don't know if it fixable from filament because the issue is how Livewire send updates. As can be seen in the livewire discussion the body is something like this:
{
"_token": "avu27UX1G0fNux3D1QGpH2XPAU1ofsdlMF6J3QfL",
"components": [
{
"snapshot": "{...},\"checksum\":\"...\"}",
"updates": {
"note.topics.1": "__rm__"
},
"calls": []
}
]
}
The Enum value is set to "__rm__"
that triggers a wrong type exception.
I don't know it this behavior can be override.
Okay, I'm going to close this as a Livewire issue then. Unless @danharrin wants to keep it open for tracking.
Sorry for the late comment here, but does anyone know if this is getting fixed in Livewire? It does affect multiple Filament projects of mine.
Package
filament/forms
Package Version
v3.0.47
Laravel Version
v10
Livewire Version
v3.0.2
PHP Version
PHP 8.1
Problem description
I used bitwise assignment on an int field and then created an enum class for this field.
Pass in the enumeration class in the option of the form's checkboxlist or select field.
The form can be created normally, but when modified, if you try to delete items in the checkboxlist or select, a type error will be prompted.
Expected behavior
Livewire does not pass the "rm " value when modifying, or it can receive parameters normally.
Steps to reproduce
Reproduction repository
https://github.com/wxfjamdc/filamentphp_form_with_enum
Relevant log output
No response