You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
There are plenty of situations within lwc development where the if:false has been used but this hasn't been catered for by the lwc:if & lwc:else construct.
as far as I can see the omission of lwc:iffalse leads to 2 ugly solutions within the code:
having an empty lwc:if block followed by a populated lwc:else
having to write a not version of the js function eg lwc:if={notShowThing}
Describe the solution you'd like
I would like to allow for the existing use case without awful code or having to code bloat with extra code eg notShowThing={return !showThing}
Describe alternatives you've considered
As far as I can see there are 2 elegant solutions to this issue.
Either:
provide a lwc:ifnot operator within the markup eg lwc:ifnot={showThing}
provide a ! operator as part of the definition lwc:if={!showThing}
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. We are working on solution #2 as part of what we're calling "complex template expressions." (It is still under active development and not released yet.) This would allow you to use ! in your expressions.
Is your feature request related to a problem? Please describe.
There are plenty of situations within lwc development where the if:false has been used but this hasn't been catered for by the lwc:if & lwc:else construct.
as far as I can see the omission of lwc:iffalse leads to 2 ugly solutions within the code:
Describe the solution you'd like
I would like to allow for the existing use case without awful code or having to code bloat with extra code eg notShowThing={return !showThing}
Describe alternatives you've considered
As far as I can see there are 2 elegant solutions to this issue.
Either:
The text was updated successfully, but these errors were encountered: