I need to hide dropdown-menu. i tried .hidden property but it is not working
<paper-dropdown-menu id="firmChannelFilter" hidden="${(this._channelFilterVisibility)}"
class="small-padding" label="Channel Filter">
<paper-listbox slot="dropdown-content"
.hidden="${(this._channelFilterVisibility)}" id="firmChannel"
You should be able to set the
hiddenproperty as follows:hidden$="[[_channelFilterVisibility(valueThatChanges)]]"paper-dropdown-menu, it will automatically hide thepaper-listboxbecause it is a nested element.class$="[[_colour(obj.Active)]]"orclass$="[[_selectedColour(selectedFilter)]]"or the hidden attribute.thisquantifier - Polymer already knows and interprets anything you use between[[]]or{{}}as belonging tothis.hidden, not.hiddenin thepaper-listbox.{{}}is used for two-way binding, normally used when you are interacting with something that displays and sets a value, such as your paper-listbox.[[]]is single-way binding, normally used when something is only taking in a value.At the end of the day, your html code should look something like this:
Briefly, this is a dropdown menu that has 3 items: Item A, Item B and Item C. When you select one of them it will set the value of
this.selectedIdStringto the string "A", "B", or "C". When the value ofthis.filterPropertychanges, the functionthis._channelFilterVisibilitywill be called with the new value as the passed in parameter.