Search code examples
polymerpolymer-1.0

Polymer iron-grid doesn't work when nodes create dynamically


When elements created dynamically using data binding (including those in dom-repeat and dom-if templates), iron-grid component doesn't toggle responsive classes.


Solution

  • You must call onResize event after that elements created, like this:

    var grid = this.$.grid;
    grid.currentScreenformat = null;
    grid.onResize();