@budibase/frontend-core 2.1.45 → 2.1.46-alpha.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/package.json +3 -3
- package/src/constants.js +2 -2
- package/src/fetch/DataFetch.js +12 -1
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.46-alpha.1",
|
|
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": "
|
|
9
|
+
"@budibase/bbui": "2.1.46-alpha.1",
|
|
10
10
|
"lodash": "^4.17.21",
|
|
11
11
|
"svelte": "^3.46.2"
|
|
12
12
|
},
|
|
13
|
-
"gitHead": "
|
|
13
|
+
"gitHead": "3daa583248fcfc4bbbaef1ffd342797b57a94467"
|
|
14
14
|
}
|
package/src/constants.js
CHANGED
|
@@ -28,11 +28,11 @@ export const OperatorOptions = {
|
|
|
28
28
|
},
|
|
29
29
|
MoreThan: {
|
|
30
30
|
value: "rangeLow",
|
|
31
|
-
label: "More than",
|
|
31
|
+
label: "More than or equal to",
|
|
32
32
|
},
|
|
33
33
|
LessThan: {
|
|
34
34
|
value: "rangeHigh",
|
|
35
|
-
label: "Less than",
|
|
35
|
+
label: "Less than or equal to",
|
|
36
36
|
},
|
|
37
37
|
Contains: {
|
|
38
38
|
value: "contains",
|
package/src/fetch/DataFetch.js
CHANGED
|
@@ -117,7 +117,7 @@ export default class DataFetch {
|
|
|
117
117
|
* Fetches a fresh set of data from the server, resetting pagination
|
|
118
118
|
*/
|
|
119
119
|
async getInitialData() {
|
|
120
|
-
const { datasource, filter,
|
|
120
|
+
const { datasource, filter, paginate } = this.options
|
|
121
121
|
|
|
122
122
|
// Fetch datasource definition and determine feature flags
|
|
123
123
|
const definition = await this.getDefinition(datasource)
|
|
@@ -135,6 +135,17 @@ export default class DataFetch {
|
|
|
135
135
|
return
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
// If no sort order, default to descending
|
|
139
|
+
if (!this.options.sortOrder) {
|
|
140
|
+
this.options.sortOrder = "ascending"
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// If no sort column, use the first field in the schema
|
|
144
|
+
if (!this.options.sortColumn) {
|
|
145
|
+
this.options.sortColumn = Object.keys(schema)[0]
|
|
146
|
+
}
|
|
147
|
+
const { sortColumn } = this.options
|
|
148
|
+
|
|
138
149
|
// Determine what sort type to use
|
|
139
150
|
let sortType = "string"
|
|
140
151
|
if (sortColumn) {
|