The option using enums on the edit page is not automatically selected after created
I already follow the instruction in here: https://filamentphp.com/docs/3.x/support/enums#overview
but when editing record. the select always at "Select an option"
this is my enum class
in the model i added this
and in resource i added this in form() method:
is something missing?
3 Replies
you probably don't need the
->enum
?Out of interest, are you seeing any Livewire errors on the page?
I've seen some Livewire weirdness when casting model attributes to custom classes.
with or without it still same
no errors
ok. the problem is solved
there is nothing wrong in using an enum class. it's just that the data 'type' apparently doesn't exist in my model.