<aura:if> rendering inconsistent
Issue #606
resolved
See screenshot. <aura:if> is a handy lightning tool to conditionally render part of a page/component - its single attribute, "isTrue", is designed to take an expression in braces {!...} that returns a boolean. Oddly enough, IC actually wants a literal "true" or "false" value, and braces actually make it turn red - but not all the time. As you can see in the screenshot, it flags the first usage as "Wrong attribute value" but not subsequent usages of the tag. Not a deal breaker by any means - it all compiles just fine - I just thought it odd.
Comments (6)
-
repo owner -
reporter Cool, thanks!
-
repo owner Issue
#618was marked as a duplicate of this issue. -
repo owner - changed status to resolved
Delivered in 1.7.9.4.
-
repo owner - changed component to Lightning (Aura)
-
repo owner - changed component to Aura
- Log in to comment
Yeah, the issue is that IC supports component/attribute completions by registering an XSD for each namespace (e.g.,
aura
,ltng
, etc.). This works REALLY well overall, but when you have an XSD attribute of typexsd:boolean
, it expects only variants oftrue
andfalse
. The{!...}
expressions are effectively evaluated as empty from the XSD processor's standpoint. Ideally I'd evaluate the{!...}
expression for its type and provide that to the XSD processor, but I'm not sure if that's going to be possible. I think there's a way that I can suppress that warning/error, though, so I'll keep this open for me to investigate that. Thanks for reporting!