Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions firebase-element.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,18 +234,20 @@ <h3>My Firebase Data</h3>
if (this.limit > 0) {
query = query.limit(this.limit);
}
this.query = query;
}
this.query = query;
},
queryChanged: function() {
// initialize
this._setData(null);
// data acquisition
this.dataReady = false;
this.valueLoading = true;
this.query.once('value', this.valueLoaded, this);
// observe server-side data
this.observeQuery();
if (this.query) {
this.valueLoading = true;
this.query.once('value', this.valueLoaded, this);
// observe server-side data
this.observeQuery();
}
},
valueLoaded: function(snapshot) {
this.valueLoading = false;
Expand Down Expand Up @@ -380,12 +382,8 @@ <h3>My Firebase Data</h3>
}
},
dataChange: function() {
//this.job('change', function() {
if (this.data) {
this.keys = this.data ? Object.keys(this.data) : [];
}
this.fire('data-change');
//});
this.keys = this.data ? Object.keys(this.data) : [];
this.fire('data-change');
},
//
// client-side effects
Expand Down