Closed zandaqo closed 8 years ago
Hi,
If the expression evaluates to either null or undefined, the attribute should be omitted. This is undocumented ATM.
Try this:
<input type="checkbox" checked="{ isChecked ? 'checked' : null}">
or
<input type="checkbox" checked="{ isChecked ? '' : null}">
Yes, that works. Thanks!
Though I would recommend at least adding this into the examples in Readme to avoid possible confusion over it.
This appears to work for undefined but not for null.
Hi,
I'd like to add attributes depending on a condition, something like:
which should add
checked
attribute to the input ifisChecked
is true:That doesn't seem to be possible with the current implementation. I'm wondering if there is another, declarative way to do it, and if not, whether it was left out because of some architectural constraints or simply was not previously considered?