From 5129fc8f467c3cc440b5aca8eb753a497367c38b Mon Sep 17 00:00:00 2001 From: chenos Date: Sat, 8 Oct 2022 22:42:56 +0800 Subject: [PATCH] fix: missing RefreshActionInitializer (cherry picked from commit e6340fc23344ea8ff0e3402e686ea1d6f3e79cba) --- .../items/RefreshActionInitializer.tsx | 16 ++++++++++++++++ .../src/schema-initializer/items/index.tsx | 2 ++ 2 files changed, 18 insertions(+) create mode 100644 packages/core/client/src/schema-initializer/items/RefreshActionInitializer.tsx diff --git a/packages/core/client/src/schema-initializer/items/RefreshActionInitializer.tsx b/packages/core/client/src/schema-initializer/items/RefreshActionInitializer.tsx new file mode 100644 index 0000000000..798dcfbd21 --- /dev/null +++ b/packages/core/client/src/schema-initializer/items/RefreshActionInitializer.tsx @@ -0,0 +1,16 @@ +import React from "react"; +import { ActionInitializer } from "./ActionInitializer"; + +export const RefreshActionInitializer = (props) => { + const schema = { + title: '{{ t("Refresh") }}', + 'x-action': 'refresh', + 'x-component': 'Action', + 'x-designer': 'Action.Designer', + 'x-component-props': { + icon: 'ReloadOutlined', + useProps: '{{ useRefreshActionProps }}', + }, + }; + return ; +}; diff --git a/packages/core/client/src/schema-initializer/items/index.tsx b/packages/core/client/src/schema-initializer/items/index.tsx index 3770fe17d0..4c6ec6b3ef 100644 --- a/packages/core/client/src/schema-initializer/items/index.tsx +++ b/packages/core/client/src/schema-initializer/items/index.tsx @@ -24,6 +24,7 @@ export * from './RecordAssociationFormBlockInitializer'; export * from './RecordFormBlockInitializer'; export * from './RecordReadPrettyAssociationFormBlockInitializer'; export * from './RecordReadPrettyFormBlockInitializer'; +export * from './RefreshActionInitializer'; export * from './SubmitActionInitializer'; export * from './TableActionColumnInitializer'; export * from './TableBlockInitializer'; @@ -32,3 +33,4 @@ export * from './TableSelectorInitializer'; export * from './UpdateActionInitializer'; export * from './UpdateSubmitActionInitializer'; export * from './ViewActionInitializer'; +