polymer 2.x - prevent paper-listbox selection change -
i got paper-listbox containing paper-checkbox contained within each paper-item of list.
<paper-listbox id="groupmembers" multi attr-for-selected="label"> <template is="dom-repeat" items="[[users]]" as="member"> <paper-item label="[[member.user]]"> <span class="member-user">[[member.user]]</span> <paper-checkbox checked="[[member.ismanager]]"></paper-checkbox> </paper-item> </template> </paper-listbox>
whenever checkbox clicked changes selected state of listbox items resulting in paper-item becoming selected or deselected.
how can prevented?
paper-listbox
uses polymer.ironselectablebehavior
, polymer.ironmultiselectablebehavior
. so, can use selectable
attribute in order prevent changing selected state.
selectable
css selector string. if set, items match css selector selectable. can put random string won't match paper-item
element.
wiki
Comments
Post a Comment