mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix: ensure ellipsis property is correctly set in schema component props (#6520)
* fix: ensure ellipsis property is correctly set in schema component props * fix: replace direct assignment with lodash set for ellipsis property in schema
This commit is contained in:
parent
c80fbc3063
commit
f7af0c4445
@ -8,6 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useField, useFieldSchema } from '@formily/react';
|
import { useField, useFieldSchema } from '@formily/react';
|
||||||
|
import _ from 'lodash';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useBlockContext, useOpenModeContext } from '../../../../';
|
import { useBlockContext, useOpenModeContext } from '../../../../';
|
||||||
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
||||||
@ -45,11 +46,12 @@ export const ellipsisSettingsItem: SchemaSettingsItemType = {
|
|||||||
tableFieldInstanceList.forEach((fieldInstance) => {
|
tableFieldInstanceList.forEach((fieldInstance) => {
|
||||||
fieldInstance.componentProps.ellipsis = checked;
|
fieldInstance.componentProps.ellipsis = checked;
|
||||||
});
|
});
|
||||||
schema['x-component-props']['ellipsis'] = checked;
|
|
||||||
} else {
|
} else {
|
||||||
formField.componentProps.ellipsis = checked;
|
formField.componentProps.ellipsis = checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_.set(schema, 'x-component-props.ellipsis', checked);
|
||||||
|
|
||||||
await dn.emit('patch', {
|
await dn.emit('patch', {
|
||||||
schema: {
|
schema: {
|
||||||
'x-uid': schema['x-uid'],
|
'x-uid': schema['x-uid'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user