dom-repeat

Polymer - dom-repeat & caching of element data in DOM tree

女生的网名这么多〃 提交于 2020-01-05 03:59:08
问题 following scenario: I have a Firebase database containing a list that is used to create a set of "paper-cards" with dom-repeat : <template is="dom-repeat" items="{{items}}"> <my-element card="{{item}}"> <paper-card id="{{card.id}}"> ... </paper-card> </my-element> </template> In the UI, the user can add or delete paper-cards, so items also get deleted in Firebase. Now I realized if I change the CSS of an element (e.g. fadeIn, fadeOut animation) and afterwards delete a card and later add one

Polymer 1 and Firebase: How to deal with a large dataset with dom-repeat?

一曲冷凌霜 提交于 2019-12-25 02:47:16
问题 So, I am using firebase-query to read a dataset of about 9000 items. Then I am displaying the list of items with dom-repeat (with all sorts of filtering and sorting options). It all worked well when I tested it with 10 items or so, but now that I am reading the full dataset I have no idea how to manage it... the entire 9000 items are displayed, which obviously is not quite manageable. Here is a simplified version of what I have: <firebase-query path="/organisations" data="{{organisations}}"><

Polymer dom-repeat not displaying the dynamically added values

天大地大妈咪最大 提交于 2019-12-24 09:49:08
问题 Polymer dom-repeat is not working as expected, when I add a new element to the Array dynamically, dom-repeat not displaying the value. I am using the Polymer's array mutation methods when pushing items into the array, but still not working. Please check the codepen link; <dom-module id="wind-studio-widget"> <template> <div on-tap='_addNewPad' style="cursor:pointer"><strong>Click Me</strong></div> <template id="padListContainerId" is="dom-repeat" items="[[padList]]"> <p style="border:1px solid

Pushing to data-bound array used in dom-repeat (Polymer)

爷,独闯天下 提交于 2019-12-02 12:03:23
问题 I have a data-bound array ( dom-repeat ) in a custom Polymer element, and I need to push new data into the array. It's not displaying the items, even though it knows 2 elements have been added. What am I missing here? jsFiddle <link rel="import" href="../../bower_components/polymer/polymer.html"> <dom-module id="main-element"> <template> <ul> <template is="dom-repeat" items="{{people}}"> <li>{{item.first}}</li> </template> </ul> </template> <script> (function() { 'use strict'; Polymer({ is: