F
Filament9mo ago
SiGuy

Infolist TextEntry list (hasMany Relationship) with different colors

Hi! I am trying to create an Infolist TextEntry for a "tags" Relationship. The Tag's Name property should be displayed as a badge in the corresponding color that is set on the Tag as a Property. I only seem to be able to set ONE Color for all Entries. Is there a way (besides wrapping the TextEntry in a RepeatableEntry) to set the Badge Color for each Tag? I see there is a colors() method on the TextEntry Component to set a color based on a state, but i would need something like a callback with the current record to set the Color like: fn(Tag $record) => $record->getColor(); The Tag Model also implements the HasColor Contract in the hopes that this would work magically - but it doesn't. Alternativley: is there a way to display the RepeatableEntry as Inline-Flex list?
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server