@nocobase/plugin-field-sort 2.1.0-beta.11 → 2.1.0-beta.13
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/dist/externalVersion.js
CHANGED
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"antd": "5.24.2",
|
|
12
12
|
"react": "18.2.0",
|
|
13
|
-
"@nocobase/flow-engine": "2.1.0-beta.
|
|
14
|
-
"@nocobase/client": "2.1.0-beta.
|
|
13
|
+
"@nocobase/flow-engine": "2.1.0-beta.13",
|
|
14
|
+
"@nocobase/client": "2.1.0-beta.13",
|
|
15
15
|
"lodash": "4.17.21",
|
|
16
|
-
"@nocobase/database": "2.1.0-beta.
|
|
17
|
-
"@nocobase/actions": "2.1.0-beta.
|
|
18
|
-
"@nocobase/server": "2.1.0-beta.
|
|
19
|
-
"@nocobase/data-source-manager": "2.1.0-beta.
|
|
16
|
+
"@nocobase/database": "2.1.0-beta.13",
|
|
17
|
+
"@nocobase/actions": "2.1.0-beta.13",
|
|
18
|
+
"@nocobase/server": "2.1.0-beta.13",
|
|
19
|
+
"@nocobase/data-source-manager": "2.1.0-beta.13",
|
|
20
20
|
"sequelize": "6.35.2",
|
|
21
|
-
"@nocobase/lock-manager": "2.1.0-beta.
|
|
21
|
+
"@nocobase/lock-manager": "2.1.0-beta.13"
|
|
22
22
|
};
|
|
@@ -168,7 +168,11 @@ class SortField extends import_database.Field {
|
|
|
168
168
|
};
|
|
169
169
|
const scopeKey = this.options.scopeKey;
|
|
170
170
|
if (scopeKey) {
|
|
171
|
-
const
|
|
171
|
+
const scopeKeyAttribute = this.collection.model.rawAttributes[scopeKey];
|
|
172
|
+
if (!scopeKeyAttribute || !scopeKeyAttribute.field) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
const scopeKeyColumn = scopeKeyAttribute.field;
|
|
172
176
|
const groups = await this.collection.model.findAll({
|
|
173
177
|
attributes: [[import_sequelize.Sequelize.fn("DISTINCT", import_sequelize.Sequelize.col(scopeKeyColumn)), scopeKey]],
|
|
174
178
|
raw: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-field-sort",
|
|
3
|
-
"version": "2.1.0-beta.
|
|
3
|
+
"version": "2.1.0-beta.13",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"displayName": "Collection field: Sort",
|
|
6
6
|
"displayName.ru-RU": "Поле коллекции: Сортировка",
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"keywords": [
|
|
23
23
|
"Collection fields"
|
|
24
24
|
],
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "691716e5f4e5f8bd3859d65bc8a29b4e3c32209b"
|
|
26
26
|
}
|