paper-menu with multiple selections, howto deselect all

Asked By: Anonymous

I use paper-menu with multiple selections (multi). Everything works fine so fare, but with a deselect all method things seems more complicated.

With html

<paper-menu multi selected-values="{{selectedValues}}">...


List<String> selectedValues = [];...

Things got binded, and every iron-select/iron-deselect event results in a correct update of the selectedValues list in dart.

With clear('selectedValues') the list empties and the logic behaves like no selection is done, but in Dartium the items that previous was
selected remains marked as selected.

I have also tried with the selectedItems List or with the foreach deselect with the select method to PaperMenu, but still not successful update
in Dartium.

Anyone with ideas how to implement this?


Answered By: Anonymous

Found a workaround for the issue with the select method. The menu with selected values can be replaced with a new similar element created with the Dom api. One drawback is the bindings can’t be set up, so these needs to be hacked with get and set methods at the element. Otherwise this seems to work ok. The calls to the Dom api are shown below.

ParticipantMenu oldPm = $$('#id_filterselection') as ParticipantMenu;
ParticipantMenu newPm = document.createElement('participant-menu');

Polymer.dom(parentNode).insertBefore(newPm, oldPm);
techinplanet staff

techinplanet staff

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno