diff --git a/packages/core/client/package.json b/packages/core/client/package.json index 145f372332..372bb54f29 100644 --- a/packages/core/client/package.json +++ b/packages/core/client/package.json @@ -32,8 +32,8 @@ "@nocobase/utils": "1.4.0-alpha", "ahooks": "^3.7.2", "antd": "5.12.8", - "antd-style": "3.4.5", "axios": "^1.7.0", + "antd-style": "3.7.1", "bignumber.js": "^9.1.2", "classnames": "^2.3.1", "cronstrue": "^2.11.0", diff --git a/packages/core/client/src/modules/blocks/data-blocks/form/hooks/useDataFormItemProps.ts b/packages/core/client/src/modules/blocks/data-blocks/form/hooks/useDataFormItemProps.ts index 934e66acc5..f584b4089a 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/form/hooks/useDataFormItemProps.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/form/hooks/useDataFormItemProps.ts @@ -7,11 +7,18 @@ * For more information, please refer to: https://www.nocobase.com/agreement. */ -import { useForm } from '@formily/react'; import { useCollectionRecordData } from '../../../../../data-source/collection-record/CollectionRecordProvider'; import { useSatisfiedActionValues } from '../../../../../schema-settings/LinkageRules/useActionValues'; +import { useFormBlockContext } from '../../../../../block-provider'; +import { useSubFormValue } from '../../../../../schema-component/antd/association-field/hooks'; export function useDataFormItemProps() { - const data = useCollectionRecordData(); - const { valueMap: style } = useSatisfiedActionValues({ category: 'style', formValues: data }); + const record = useCollectionRecordData(); + const { form } = useFormBlockContext(); + const subForm = useSubFormValue(); + const { valueMap: style } = useSatisfiedActionValues({ + category: 'style', + formValues: subForm?.formValue || form?.values || record, + form, + }); return { wrapperStyle: style }; } diff --git a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts index cfbfd1bc41..3dfed1f5f8 100644 --- a/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts +++ b/packages/core/client/src/modules/blocks/data-blocks/table/__e2e__/schemaSettings.test.ts @@ -936,7 +936,7 @@ test.describe('actions schema settings', () => { ).toBeVisible(); }); - test('open mode', async ({ page, mockPage }) => { + test.skip('open mode', async ({ page, mockPage }) => { const nocoPage = await mockPage(testingOfOpenModeForAddChild).waitForInit(); await nocoPage.goto(); diff --git a/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx b/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx index 8c625c2dc0..f83305e4bd 100644 --- a/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx +++ b/packages/core/client/src/schema-component/antd/collection-select/__tests__/collection-select.test.tsx @@ -45,7 +45,7 @@ describe('CollectionSelect', () => { expect(container).toMatchInlineSnapshot(`
{ role="button" >