Digging into the core-list source code, it looks like it checks an element's hidden
attribute using Javascript. But setting <div hidden="false">
results in the div
being hidden. Can I somehow bind an expression to this Javascript attribute or do I need to submit a PR to core-list to explicitly add support?
You can hide / show polymer elements with the hidden? attribute.
<span hidden?="{{showSpan}}">This may or may not be hidden.</span>
if the boolean expression 'showSpan' is truthy, the span element is displayed, otherwise it is omitted.
You can toggle the state of showSpan like this:
<div on-click="{{showinput}}">
<span hidden?="{{showSpan}}">This may or may not be hidden</span>
</div>
Polymer({
showSpan: false,
showinput: function() {
this.showSpan = !this.showSpan;
}
});
If you want that your element not being hidden you should remove the hidden attribute. hidden="false" does not means much in html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With