How to remove an item from a paper-listbox?

2019-09-12 13:04发布

问题:

I can add an item to a paper-listbox with

Polymer.dom($['mylistbox']).append(paperItem);

However I'm having trouble deleting it from the list afterwards. I tried:

paperItem.remove();

That initially makes it dissapear, but it appears again after selecting another item in the list. How do I remove a paper-item from a listbox?

回答1:

Polymer.dom($['mylistbox']).removeChild(paperItem);