@astral/mobx-query 1.0.0 → 1.0.1
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/InfiniteQuery/InfiniteQuery.js +4 -1
- package/Query/Query.js +4 -1
- package/package.json +1 -1
|
@@ -149,7 +149,10 @@ export class InfiniteQuery {
|
|
|
149
149
|
* и начнется запрос, в результате которого, данные обновятся
|
|
150
150
|
*/
|
|
151
151
|
get data() {
|
|
152
|
-
const shouldSync = this.enabledAutoFetch &&
|
|
152
|
+
const shouldSync = this.enabledAutoFetch &&
|
|
153
|
+
!this.isSuccess &&
|
|
154
|
+
!this.isLoading &&
|
|
155
|
+
!this.isError;
|
|
153
156
|
if (this.isInvalid || shouldSync) {
|
|
154
157
|
// т.к. при вызове апдейта, изменяются флаги, на которые подписан data,
|
|
155
158
|
// нужно вызывать этот экшн асинхронно
|
package/Query/Query.js
CHANGED
|
@@ -88,7 +88,10 @@ export class Query {
|
|
|
88
88
|
* и начнется запрос, в результате которого, данные обновятся
|
|
89
89
|
*/
|
|
90
90
|
get data() {
|
|
91
|
-
const shouldSync = this.enabledAutoFetch &&
|
|
91
|
+
const shouldSync = this.enabledAutoFetch &&
|
|
92
|
+
!this.isSuccess &&
|
|
93
|
+
!this.isLoading &&
|
|
94
|
+
!this.isError;
|
|
92
95
|
if (this.isInvalid || shouldSync) {
|
|
93
96
|
// т.к. при вызове апдейта, изменяются флаги, на которые подписан data,
|
|
94
97
|
// нужно вызывать этот экшн асинхронно
|