mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-07 14:39:25 +08:00
fix: default sort with multi filter target keys (#5383)
This commit is contained in:
parent
2672789a64
commit
ad767a3c1c
@ -140,6 +140,10 @@ export class OptionsParser {
|
||||
|
||||
let defaultSortField = this.model.primaryKeyAttribute;
|
||||
|
||||
if (Array.isArray(this.collection.filterTargetKey) && this.collection.filterTargetKey.length == 1) {
|
||||
defaultSortField = this.collection.filterTargetKey[0];
|
||||
}
|
||||
|
||||
if (!defaultSortField && this.collection.filterTargetKey && !Array.isArray(this.collection.filterTargetKey)) {
|
||||
defaultSortField = this.collection.filterTargetKey;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user