fabbricadigitale / paper-chip

A chip web component made with Polymer 2 following Material Design guidelines
http://webcomponents.org/element/fabbricadigitale/paper-chip
MIT License
31 stars 16 forks source link

Fixes #32 #33

Closed ihabiboellah closed 7 years ago

ihabiboellah commented 7 years ago

I don't know why the observer does not invoke if it only observes the array. As a workaround I made it observe the array size as well.

ihabiboellah commented 7 years ago

I tried observing values.* instead of values.length (See https://github.com/Portavita/paper-chip/commit/94f830202bce3015e655c084266319b37df7b713)

This kind of seems to work, but it triggers the observer twice:

I suggest to change values.* to values.splices.

See: https://www.polymer-project.org/2.0/docs/devguide/observers#array-observation