fix: o2o association field not displaying target collection field in… (#5921)

* fix: o2o association field not  displaying target collection field in detail and form block

* fix: test
This commit is contained in:
Katherine 2024-12-25 19:32:31 +08:00 committed by GitHub
parent 5210267d53
commit 9a93490dd2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 6 deletions

View File

@ -2,9 +2,7 @@
"version": "1.4.15",
"npmClient": "yarn",
"useWorkspaces": true,
"npmClientArgs": [
"--ignore-engines"
],
"npmClientArgs": ["--ignore-engines"],
"command": {
"version": {
"forcePublish": true,

View File

@ -512,7 +512,7 @@ export const useAssociatedFormItemInitializerFields = (options?: any) => {
const form = useForm();
const { t } = useTranslation();
const { readPretty = form.readPretty, block = 'Form' } = options || {};
const interfaces = block === 'Form' ? ['m2o'] : ['o2o', 'oho', 'obo', 'm2o'];
const interfaces = block === 'Form' ? ['m2o', 'obo', 'oho'] : ['o2o', 'oho', 'obo', 'm2o'];
const groups = fields
?.filter((field) => {

View File

@ -50,8 +50,8 @@ test.describe('direct duplicate & copy into the form and continue to fill in', (
await page.mouse.move(300, 0);
await page.getByLabel('schema-initializer-Grid-form:configureFields-general').hover();
await page.getByRole('menuitem', { name: 'singleLineText' }).click();
await page.getByRole('menuitem', { name: 'oneToOneBelongsTo' }).click();
await page.getByRole('menuitem', { name: 'oneToOneHasOne' }).click();
await page.getByRole('menuitem', { name: 'oneToOneBelongsTo' }).first().click();
await page.getByRole('menuitem', { name: 'oneToOneHasOne' }).first().click();
await page.getByRole('menuitem', { name: 'oneToMany' }).click();
await page.getByRole('menuitem', { name: 'manyToOne', exact: true }).click();
await page.getByRole('menuitem', { name: 'manyToMany' }).click();