@budibase/frontend-core 1.2.2 → 1.2.5
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/package.json +3 -3
- package/src/fetch/DataFetch.js +15 -5
- package/src/fetch/TableFetch.js +1 -0
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
7
7
|
"svelte": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@budibase/bbui": "^1.2.
|
|
9
|
+
"@budibase/bbui": "^1.2.5",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "fe1a52ca497fd3440484bab2e91eaad54096f0ce"
|
|
14
14
|
}
|
package/src/fetch/DataFetch.js
CHANGED
|
@@ -170,6 +170,7 @@ export default class DataFetch {
|
|
|
170
170
|
rows: page.rows,
|
|
171
171
|
info: page.info,
|
|
172
172
|
cursors: paginate && page.hasNextPage ? [null, page.cursor] : [null],
|
|
173
|
+
error: page.error,
|
|
173
174
|
}))
|
|
174
175
|
}
|
|
175
176
|
|
|
@@ -182,7 +183,7 @@ export default class DataFetch {
|
|
|
182
183
|
const features = get(this.featureStore)
|
|
183
184
|
|
|
184
185
|
// Get the actual data
|
|
185
|
-
let { rows, info, hasNextPage, cursor } = await this.getData()
|
|
186
|
+
let { rows, info, hasNextPage, cursor, error } = await this.getData()
|
|
186
187
|
|
|
187
188
|
// If we don't support searching, do a client search
|
|
188
189
|
if (!features.supportsSearch) {
|
|
@@ -204,6 +205,7 @@ export default class DataFetch {
|
|
|
204
205
|
info,
|
|
205
206
|
hasNextPage,
|
|
206
207
|
cursor,
|
|
208
|
+
error,
|
|
207
209
|
}
|
|
208
210
|
}
|
|
209
211
|
|
|
@@ -345,8 +347,14 @@ export default class DataFetch {
|
|
|
345
347
|
return
|
|
346
348
|
}
|
|
347
349
|
this.store.update($store => ({ ...$store, loading: true }))
|
|
348
|
-
const { rows, info } = await this.getPage()
|
|
349
|
-
this.store.update($store => ({
|
|
350
|
+
const { rows, info, error } = await this.getPage()
|
|
351
|
+
this.store.update($store => ({
|
|
352
|
+
...$store,
|
|
353
|
+
rows,
|
|
354
|
+
info,
|
|
355
|
+
loading: false,
|
|
356
|
+
error,
|
|
357
|
+
}))
|
|
350
358
|
}
|
|
351
359
|
|
|
352
360
|
/**
|
|
@@ -386,7 +394,7 @@ export default class DataFetch {
|
|
|
386
394
|
cursor: nextCursor,
|
|
387
395
|
pageNumber: $store.pageNumber + 1,
|
|
388
396
|
}))
|
|
389
|
-
const { rows, info, hasNextPage, cursor } = await this.getPage()
|
|
397
|
+
const { rows, info, hasNextPage, cursor, error } = await this.getPage()
|
|
390
398
|
|
|
391
399
|
// Update state
|
|
392
400
|
this.store.update($store => {
|
|
@@ -400,6 +408,7 @@ export default class DataFetch {
|
|
|
400
408
|
info,
|
|
401
409
|
cursors,
|
|
402
410
|
loading: false,
|
|
411
|
+
error,
|
|
403
412
|
}
|
|
404
413
|
})
|
|
405
414
|
}
|
|
@@ -421,7 +430,7 @@ export default class DataFetch {
|
|
|
421
430
|
cursor: prevCursor,
|
|
422
431
|
pageNumber: $store.pageNumber - 1,
|
|
423
432
|
}))
|
|
424
|
-
const { rows, info } = await this.getPage()
|
|
433
|
+
const { rows, info, error } = await this.getPage()
|
|
425
434
|
|
|
426
435
|
// Update state
|
|
427
436
|
this.store.update($store => {
|
|
@@ -430,6 +439,7 @@ export default class DataFetch {
|
|
|
430
439
|
rows,
|
|
431
440
|
info,
|
|
432
441
|
loading: false,
|
|
442
|
+
error,
|
|
433
443
|
}
|
|
434
444
|
})
|
|
435
445
|
}
|