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 = {};
|
const where = {};
|
||||||
|
|
||||||
if (scopeKey) {
|
if (scopeKey) {
|
||||||
where[scopeKey] = instance.get(scopeKey);
|
const value = instance.get(scopeKey);
|
||||||
|
if (value !== undefined && value !== null) {
|
||||||
|
where[scopeKey] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await sortFieldMutex.runExclusive(async () => {
|
await sortFieldMutex.runExclusive(async () => {
|
||||||
|
@ -6,9 +6,8 @@ export default {
|
|||||||
model: 'FieldModel',
|
model: 'FieldModel',
|
||||||
timestamps: false,
|
timestamps: false,
|
||||||
sortable: {
|
sortable: {
|
||||||
type: 'sort',
|
|
||||||
name: 'sort',
|
name: 'sort',
|
||||||
scope: ['parentKey'],
|
scopeKey: 'parentKey',
|
||||||
},
|
},
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user