Heroicon in Tag/Badge messing with alignment in Table
Whenever im using a heroicon string in a Tag/Badge it breaks vertical alignment...
->badge()
->icon(function (Employee $record): ?string {
...some code...
return match ($typ) {
'Sperrung' => 'heroicon-o-no-symbol',
'Erinnerung' => 'heroicon-o-magnifying-glass',
'Ablaufwarnung' => 'heroicon-o-exclamation-triangle',
default => null,
};
.... some code...
})
->color('gray')
Any way to stop the misaligment?
Edit: when i remove the heroicon from the code and return null here while debugging everything is perfectly aligned

7 Replies
Sounds like a bug! Can you report it?
if you tell me how i send a bugreport of course if will!
What i noticed during my research of this problem:
Filament 4.x Docs:
https://filamentphp.com/docs/4.x/tables/columns/text#adding-an-icon
According to docs you should use UnitEnum Heroicons - i just tried that but my IDE returns a warning and Laravel reports an error when refreshing the page with UnitEnum style Heroicon given.
Either im too dumb to understand or the Docs dont match


Solution
HeroIcon is a BackedEnum. Sounds like your IDE is drunkBugs are reported as Github issues with a reproduction repo
Thanks, i will try another IDE and report the Bug if it persists though IDEs
If it's just IDE and not PHP error, it's not really a bug
it seems like you are right, the IDE is indeed drunk and the code just executes.
The badge is still misaligned though, i will see if there is an open issue on github and will open one in case there is none.
Thanks for looking into it

