mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 08:55:33 +00:00
fix: useDesigner Designer should has default toolbar (#3365)
* fix: useDesigner Designer should has default toolbar * test: e2e schemaSeting for linkage rule * test: e2e schemaSeting for linkage rule * test: e2e schemaSeting for linkage rule
This commit is contained in:
parent
2f8b0e75f8
commit
4d44c6e24e
@ -85,7 +85,7 @@ export const useFormBlockType = () => {
|
||||
|
||||
export const useIsDetailBlock = () => {
|
||||
const ctx = useFormBlockContext();
|
||||
return ctx.type === 'update';
|
||||
return ctx.type !== 'create';
|
||||
};
|
||||
|
||||
export const FormBlockProvider = (props) => {
|
||||
|
@ -1164,7 +1164,7 @@ test.describe('actions schema settings', () => {
|
||||
await page.getByRole('button', { name: 'Submit' }).hover();
|
||||
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
||||
},
|
||||
supportedOptions: ['Edit button', 'Linkage rules', 'Bind workflows', 'Delete'],
|
||||
supportedOptions: ['Edit button', 'Bind workflows', 'Delete'],
|
||||
});
|
||||
});
|
||||
|
||||
@ -1179,7 +1179,6 @@ test.describe('actions schema settings', () => {
|
||||
},
|
||||
supportedOptions: [
|
||||
'Edit button',
|
||||
'Linkage rules',
|
||||
'Assign field values',
|
||||
'Skip required validation',
|
||||
'After successful submission',
|
||||
|
@ -148,7 +148,7 @@ test.describe('actions schema settings', () => {
|
||||
await page.getByRole('button', { name: 'Submit' }).hover();
|
||||
await page.getByRole('button', { name: 'designer-schema-settings-Action-Action.Designer-users' }).hover();
|
||||
},
|
||||
supportedOptions: ['Edit button', 'Linkage rules', 'Bind workflows', 'Delete'],
|
||||
supportedOptions: ['Edit button', 'Bind workflows', 'Delete'],
|
||||
});
|
||||
});
|
||||
|
||||
@ -163,7 +163,6 @@ test.describe('actions schema settings', () => {
|
||||
},
|
||||
supportedOptions: [
|
||||
'Edit button',
|
||||
'Linkage rules',
|
||||
'Assign field values',
|
||||
'Skip required validation',
|
||||
'After successful submission',
|
||||
|
@ -92,7 +92,7 @@ test.describe('actions schema settings', () => {
|
||||
await page.getByLabel('action-Action-Filter-submit-general-filter-form').hover();
|
||||
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
||||
},
|
||||
supportedOptions: ['Edit button', 'Linkage rules', 'Delete'],
|
||||
supportedOptions: ['Edit button', 'Delete'],
|
||||
});
|
||||
|
||||
// Reset settings --------------------------------------------------------------------
|
||||
@ -102,7 +102,7 @@ test.describe('actions schema settings', () => {
|
||||
await page.getByLabel('action-Action-Reset-general-filter-form').hover();
|
||||
await page.getByRole('button', { name: 'designer-schema-settings-Action' }).hover();
|
||||
},
|
||||
supportedOptions: ['Edit button', 'Linkage rules', 'Delete'],
|
||||
supportedOptions: ['Edit button', 'Delete'],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -20,5 +20,5 @@ export const useDesigner = () => {
|
||||
}, [fieldSchema]);
|
||||
|
||||
const component = useComponent(toolbar);
|
||||
return designable ? component : Def;
|
||||
return designable ? component || Def : Def;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user