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
First of all, thank you for sprae, just started playing around with it and I like it a lot!
I was trying to do <pre :if="() => !!(Object.values($selected).filter(x => x).length)"> expecting that when the $selected object does not contain any values in it's props the <pre> element wouldn't show (i tripplechecked, the expression does work and evaluates to either 0 without !! or false when "casting" to bool, I'd expect both to work, e.g. falsy values in :if).
Am I doing something wrong or is not currently not possible to use functions in :if?
thanks for a quick reply and keep the great work up!
The text was updated successfully, but these errors were encountered:
It makes me wonder if it should take functions as value.
Do you have a particular example where you need :if to be a function and plain code doesn't suffice?
First of all, thank you for sprae, just started playing around with it and I like it a lot!
I was trying to do
<pre :if="() => !!(Object.values($selected).filter(x => x).length)">
expecting that when the$selected
object does not contain any values in it's props the<pre>
element wouldn't show (i tripplechecked, the expression does work and evaluates to either 0 without !! or false when "casting" to bool, I'd expect both to work, e.g.falsy
values in :if).Am I doing something wrong or is not currently not possible to use functions in
:if
?thanks for a quick reply and keep the great work up!
The text was updated successfully, but these errors were encountered: