@livequery/client 1.0.47 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Collection.js +3 -3
- package/package.json +1 -1
package/build/Collection.js
CHANGED
|
@@ -162,7 +162,8 @@ class CollectionObservable extends rxjs_1.Observable {
|
|
|
162
162
|
actions.update && __classPrivateFieldGet(this, _CollectionObservable_$state, "f").next(__classPrivateFieldGet(this, _CollectionObservable_state, "f"));
|
|
163
163
|
}
|
|
164
164
|
fetch_data(options = {}, flush = false) {
|
|
165
|
-
|
|
165
|
+
const has_more_data_refs = __classPrivateFieldGet(this, _CollectionObservable_refs, "f").filter(ref => __classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] === undefined || (__classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] && __classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] != '#'));
|
|
166
|
+
if (!this.ref || __classPrivateFieldGet(this, _CollectionObservable_state, "f").loading || has_more_data_refs.length == 0)
|
|
166
167
|
return;
|
|
167
168
|
if (flush) {
|
|
168
169
|
__classPrivateFieldSet(this, _CollectionObservable_next_cursor, {}, "f");
|
|
@@ -172,7 +173,6 @@ class CollectionObservable extends rxjs_1.Observable {
|
|
|
172
173
|
flush && __classPrivateFieldGet(this, _CollectionObservable_IdMap, "f").clear();
|
|
173
174
|
__classPrivateFieldSet(this, _CollectionObservable_state, Object.assign(Object.assign({}, __classPrivateFieldGet(this, _CollectionObservable_state, "f")), { items: flush ? [] : __classPrivateFieldGet(this, _CollectionObservable_state, "f").items, error: null, loading: true, options }), "f");
|
|
174
175
|
__classPrivateFieldGet(this, _CollectionObservable_$state, "f").next(__classPrivateFieldGet(this, _CollectionObservable_state, "f"));
|
|
175
|
-
const has_more_data_refs = __classPrivateFieldGet(this, _CollectionObservable_refs, "f").filter(ref => __classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] === undefined || (__classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] && __classPrivateFieldGet(this, _CollectionObservable_next_cursor, "f")[ref] != '#'));
|
|
176
176
|
const queries = has_more_data_refs.map(ref => (this
|
|
177
177
|
.collection_options
|
|
178
178
|
.transporter
|
|
@@ -190,7 +190,7 @@ class CollectionObservable extends rxjs_1.Observable {
|
|
|
190
190
|
}
|
|
191
191
|
fetch_more() {
|
|
192
192
|
var _a;
|
|
193
|
-
|
|
193
|
+
this.fetch_data((_a = __classPrivateFieldGet(this, _CollectionObservable_state, "f")) === null || _a === void 0 ? void 0 : _a.options);
|
|
194
194
|
}
|
|
195
195
|
filter(filters) {
|
|
196
196
|
this.fetch_data(filters, true);
|