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 Harrin16mo ago
have you tried?
Trauma Zombie
Trauma ZombieOP16mo ago
Yeah, I am getting error: Object of class App\Enums\OrderStatus could not be converted to string
sumardi
sumardi16mo ago
Your enum class must implements Filament\Support\Contracts\HasLabel
Trauma Zombie
Trauma ZombieOP16mo ago
Thanks for the advice, I didn't read this in the documentation. But I have another problem:
Trauma Zombie
Trauma ZombieOP16mo 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 ZombieOP16mo ago
I would like to help and make a PR, but unfortunately I can't find the cause.
Dan Harrin
Dan Harrin16mo ago
please open an issue then or check open PRs, maybe theres one to fix already
Want results from more Discord servers?
Add your server