nocobase/packages/plugins/@nocobase/plugin-action-bulk-edit/src/client/BulkEditSubmitActionInitializer.tsx
Zeke Zhang ec558e3b98
refactor: flatten and merge Actions (#4336)
* chore: remove switch

* refactor: ensure compatibility with old code

* refactor: flatten Actions

* refactor: extract options

* refactor: remove isCusomeizeCreate

* refactor: merge addNew and addRecord actions

* refactor: merge Submit and Save record actions

* refactor: extract common options

* feat: add tow props called 'currentText' and 'otherText'

* chore: fix failed tests

* refactor: add ActionInitializerItem to replace ActionInitializer

* chore: fix failed tests

* fix: fix T-4284

* fix: fix inherit

* chore: fix failed test

* chore: add Switch

* chore: add Switch for delete button

* test: e2ePageObjectModel

---------

Co-authored-by: hongboji <j414562100@qq.com>
2024-05-17 09:37:23 +08:00

29 lines
893 B
TypeScript

/**
* This file is part of the NocoBase (R) project.
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
* Authors: NocoBase Team.
*
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
* For more information, please refer to: https://www.nocobase.com/agreement.
*/
import { ActionInitializerItem } from '@nocobase/client';
import React from 'react';
export const BulkEditSubmitActionInitializer = (props) => {
const schema = {
title: '{{ t("Submit") }}',
'x-action': 'submit',
'x-component': 'Action',
'x-use-component-props': 'useCustomizeBulkEditActionProps',
// 'x-designer': 'Action.Designer',
'x-toolbar': 'ActionSchemaToolbar',
'x-settings': 'actionSettings:updateSubmit',
'x-component-props': {
type: 'primary',
htmlType: 'submit',
},
};
return <ActionInitializerItem {...props} schema={schema} />;
};