Skip to content

Commit

Permalink
fix: linkage rules issue (nocobase#6182)
Browse files Browse the repository at this point in the history
* fix: linkage rules issue

* chore: e2e
  • Loading branch information
zhangzhonghe authored Feb 10, 2025
1 parent ab5e9c0 commit cfd940e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test.describe('single page menu schema settings', () => {
page,
showMenu: async () => {
await page.locator('.ant-layout-header').getByText('single page', { exact: true }).hover();
await page.getByRole('button', { name: 'designer-schema-settings-' }).hover();
await page.getByRole('button', { name: 'designer-schema-settings-' }).click();
},
supportedOptions: ['Edit', 'Move to', 'Insert before', 'Insert after', 'Delete'],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function getSubscriber({
if (fieldName === 'display' && lastState?.value === 'hidden') {
field.display = 'visible';
field.data = field.data || {};
// 在 FormItem 中使用这个属性来判断字段是否被隐藏
// 在 FormItem 中有使用这个属性来判断字段是否被隐藏
field.data.hidden = true;

requestAnimationFrame(() => {
Expand All @@ -245,6 +245,9 @@ function getSubscriber({
});
} else {
field[fieldName] = lastState?.value;
field.data = field.data || {};
// 在 FormItem 中有使用这个属性来判断字段是否被隐藏
field.data.hidden = false;
requestAnimationFrame(() => {
field.setState((state) => {
state[fieldName] = lastState?.value;
Expand Down

0 comments on commit cfd940e

Please sign in to comment.