fix(subTable): fix sorting rule setting (#3795)
This commit is contained in:
parent
428bf79298
commit
cef18eb979
@ -108,13 +108,17 @@ export const SchemaSettingsSortingRule = function SortRuleConfigure(props) {
|
|||||||
const sortArr = sort.map((item) => {
|
const sortArr = sort.map((item) => {
|
||||||
return item.direction === 'desc' ? `-${item.field}` : item.field;
|
return item.direction === 'desc' ? `-${item.field}` : item.field;
|
||||||
});
|
});
|
||||||
_.set(field.componentProps, 'service.params.sort', sortArr);
|
|
||||||
|
// 把列中的所有 field 实例找出来,进行更新
|
||||||
|
field.query(new RegExp(`[0-9]+\\.${fieldSchema.name}$`)).forEach((item) => {
|
||||||
|
_.set(item, 'componentProps.service.params.sort', sortArr);
|
||||||
|
});
|
||||||
|
_.set(fieldSchema, 'x-component-props.service.params.sort', sortArr);
|
||||||
props?.onSubmitCallBack?.(sortArr);
|
props?.onSubmitCallBack?.(sortArr);
|
||||||
fieldSchema['x-component-props'] = field.componentProps;
|
|
||||||
dn.emit('patch', {
|
dn.emit('patch', {
|
||||||
schema: {
|
schema: {
|
||||||
['x-uid']: fieldSchema['x-uid'],
|
['x-uid']: fieldSchema['x-uid'],
|
||||||
'x-component-props': field.componentProps,
|
'x-component-props': fieldSchema['x-component-props'],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
Loading…
Reference in New Issue
Block a user