paper-fab-speed-dial icon indicating copy to clipboard operation
paper-fab-speed-dial copied to clipboard

Use with templates

Open NicolasRannou opened this issue 7 years ago • 3 comments

Is there a good way to use this element with templates? The animation is broken when I do the following. (the fab button just appear, no animation)

<paper-fab-speed-dial>      
    <paper-fab icon="add"></paper-fab>
    <div class="dropdown-content">
      <template is="dom-repeat" items="{{apps}}">
        <paper-fab mini id="[[item.name]]" icon="[[item.icon]]"></paper-fab>
        <paper-tooltip for="[[item.name]]" position="left" animation-delay="0">[[item.label]]</paper-tooltip>
       </template>
    </div>
</paper-fab-speed-dial>

NicolasRannou avatar Feb 16 '17 10:02 NicolasRannou

It's not working because the animation is configured before items are added: https://github.com/pomber/paper-fab-speed-dial/blob/master/paper-fab-speed-dial.html#L69

We will need to find the way to update the animation config after children are added.
I will take a look later.

pomber avatar Feb 16 '17 12:02 pomber

Another demo:

<paper-fab-speed-dial class="three">
  <paper-fab></paper-fab>
  <div class="dropdown-content">
    <template is="dom-repeat" items="[1,2]">
      <paper-fab mini></paper-fab>
    </template>
  </div>
</paper-fab-speed-dial>

pomber avatar Feb 16 '17 13:02 pomber

Is this still an issue after #8 ?

bennypowers avatar Jan 02 '18 13:01 bennypowers