From af78e676cb1fa200e73d39fe5a10e66cde97373f Mon Sep 17 00:00:00 2001 From: lordfuoco Date: Mon, 7 Nov 2016 16:05:52 +0100 Subject: [PATCH] minor fix for async data handling --- etools-repeatable-field-set.html | 38 +++++++++++++++++++------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/etools-repeatable-field-set.html b/etools-repeatable-field-set.html index efea1f4..5fc108e 100644 --- a/etools-repeatable-field-set.html +++ b/etools-repeatable-field-set.html @@ -167,11 +167,10 @@
[[title]] ([[model.length]])
- + @@ -181,18 +180,18 @@
+ on-tap="_openDeleteConfirmation" + data-args$="[[index]]" + icon="cancel"> + hidden$="[[!allowCopy]]" + on-tap="_copyElement" + data-args$="[[index]]" + icon="content-copy">
+ data-count-val$="[[_displayIndex(index, showCounter)]]">
@@ -219,6 +218,10 @@ type: Boolean, value: false }, + hideFab: { + type: Boolean, + computed: '_computeHideFab(hidePlus, open)' + }, model: { type: Array, notify: true, @@ -266,6 +269,9 @@ value: -1 } }, + _computeHideFab: function(hidePlus, open) { + return hidePlus && open; + }, _getHasCounterClass: function(showCounter) { if (showCounter) { return 'has-counter'; @@ -360,10 +366,12 @@ this._itemCounter = this._isCopy; this._isCopy = -1; } - children.forEach(function(child) { + children.forEach(function(child) { + self.async(function() { self.$$('#item-' + self._itemCounter).appendChild(child); self._itemCounter += 1; - }); + }) + }); }, ready: function() { if (!this.hidePlus) {