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
No description
Solution:
HeroIcon is a BackedEnum. Sounds like your IDE is drunk
Jump to solution
7 Replies
toeknee
toeknee2mo ago
Sounds like a bug! Can you report it?
JungleOnly
JungleOnlyOP2mo ago
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
->icon(Heroicon::Envelope)
->icon(Heroicon::Envelope)
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
No description
No description
Solution
Dennis Koch
Dennis Koch2mo ago
HeroIcon is a BackedEnum. Sounds like your IDE is drunk
Dennis Koch
Dennis Koch2mo ago
Bugs are reported as Github issues with a reproduction repo
JungleOnly
JungleOnlyOP2mo ago
Thanks, i will try another IDE and report the Bug if it persists though IDEs
Dennis Koch
Dennis Koch2mo ago
If it's just IDE and not PHP error, it's not really a bug
JungleOnly
JungleOnlyOP2mo ago
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
No description
No description

Did you find this page helpful?