fix(sort-field): the value of the scopeKey attribute is null
This commit is contained in:
parent
16d07e9b4a
commit
695b953a8f
@ -21,7 +21,10 @@ export class SortField extends Field {
|
||||
const where = {};
|
||||
|
||||
if (scopeKey) {
|
||||
where[scopeKey] = instance.get(scopeKey);
|
||||
const value = instance.get(scopeKey);
|
||||
if (value !== undefined && value !== null) {
|
||||
where[scopeKey] = value;
|
||||
}
|
||||
}
|
||||
|
||||
await sortFieldMutex.runExclusive(async () => {
|
||||
|
@ -6,9 +6,8 @@ export default {
|
||||
model: 'FieldModel',
|
||||
timestamps: false,
|
||||
sortable: {
|
||||
type: 'sort',
|
||||
name: 'sort',
|
||||
scope: ['parentKey'],
|
||||
scopeKey: 'parentKey',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user