❔ Render HTML classes based on properties (Blazor)
So we managed to setup a Linq expression to get all matching tags from two lists and all. Which is awesome, but now I can't seem to render the Blazor component colors based on these properties..
Here's the Linq we managed to setup earlier:
and my issue is the following
I have a List of strings, these should be rendered as Badges in the HTML component, and then change the class "bg-..." based on the properties of another List
Basically:
so the conditions should be as follows (very verbose):
if any item in
_matchingTags
has the property Tag
the same as the current iteration in the loop (tag) then it should check if the property Matching
is true, if so render bg-success
else bg-secondary
So what I've got so far is this:
but this only renders green the first item of the tags, and never all matching ones...
What am I doing wrong here?1 Reply
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.