Grouping by enum

Hi guys, is it possible right now in v3 to group table rows by attribute that is casted as enum?
->groups([
Group::make('status'),
])
->groups([
Group::make('status'),
])
7 Replies
Dan Harrin
Dan Harrin2y ago
have you tried?
Trauma Zombie
Trauma ZombieOP2y ago
Yeah, I am getting error: Object of class App\Enums\OrderStatus could not be converted to string
sumardi
sumardi2y ago
Your enum class must implements Filament\Support\Contracts\HasLabel
Trauma Zombie
Trauma ZombieOP2y ago
Thanks for the advice, I didn't read this in the documentation. But I have another problem:
Trauma Zombie
Trauma ZombieOP2y ago
I think it works, but there is some HTML markup printed. I also tried it with another group. I also disabled ->groupsInDropdownOnDesktop() method and it looks like this:
Trauma Zombie
Trauma ZombieOP2y ago
I would like to help and make a PR, but unfortunately I can't find the cause.
Dan Harrin
Dan Harrin2y ago
please open an issue then or check open PRs, maybe theres one to fix already

Did you find this page helpful?