0

I am trying to combine the firebase-query element with a paper-progress bar from Polymer. Unfortunately the firebase-query has no loading property such as the iron-ajax. So I tried to change the value of indeterminate in my paperprogress when the transections-complete fires inside my firebase-query. But I am unable to receive anything in my queryComplete function like it never get's called.

 <firebase-query
  id="query"
  path="/data/notes"
  data="{{notes}}"
  transactions-complete="{{queryComplete}}"></firebase-query>

 <paper-progress id="progressBar" step="2" indeterminate="true"></paper-progress>


 <script>
   Polymer({
     is: 'my-dashboard',

       properties: {
         notes: {
           type: Object,
         },
       },
       queryComplete: function(e) {
         var progressBar = this.$$("#progressBar");
         progressBar.setAttribute("indeterminate", "false");
       },

   });
 </script>
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Niklas
  • 1,142
  • 16
  • 33
  • 2
    The Firebase Database has no API to report progress for a query. So there is no useful way to wire up a progress bar. – Frank van Puffelen Jan 27 '17 at 13:44
  • @FrankvanPuffelen Is it not needed because the realtime database is in realtime and therefore dosen't need a progress bar ? – Niklas Jan 28 '17 at 10:40
  • 1
    There are cases where it would be useful to a-priori know how much data or how many children you are synchronizing. But there's no API for that. You could roll something yourself with a separate counter node, which you'll find many questions about if you search. – Frank van Puffelen Jan 28 '17 at 10:46

0 Answers0