From d2b097c86aed87c26e65d9c727ac5661da548a17 Mon Sep 17 00:00:00 2001
From: hsm-lv <80095014+hsm-lv@users.noreply.github.com>
Date: Thu, 26 May 2022 23:07:52 +0800
Subject: [PATCH] =?UTF-8?q?feat:PickerContainer=E6=94=AF=E6=8C=81=E9=9A=90?=
=?UTF-8?q?=E8=97=8Ffooter&export=20VariableList=20and=20PickerContainer?=
=?UTF-8?q?=20(#4466)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/PickerContainer.tsx | 21 +++++++++++++--------
src/components/index.tsx | 4 ++++
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/src/components/PickerContainer.tsx b/src/components/PickerContainer.tsx
index de6097518..cb2bfff8a 100644
--- a/src/components/PickerContainer.tsx
+++ b/src/components/PickerContainer.tsx
@@ -11,6 +11,7 @@ import Button from './Button';
export interface PickerContainerProps extends ThemeProps, LocaleProps {
title?: string;
showTitle?: boolean;
+ showFooter?: boolean;
headerClassName?: string;
children: (props: {
onClick: (e: React.MouseEvent) => void;
@@ -131,7 +132,8 @@ export class PickerContainer extends React.Component<
showTitle,
headerClassName,
translate: __,
- size
+ size,
+ showFooter
} = this.props;
return (
<>
@@ -158,15 +160,18 @@ export class PickerContainer extends React.Component<
ref: this.bodyRef,
setState: this.updateState,
onClose: this.close,
- onChange: this.handleChange
+ onChange: this.handleChange,
+ onConfirm: this.confirm
})}
-
-
-
-
+ {showFooter ?? true ? (
+
+
+
+
+ ) : null}
>
);
diff --git a/src/components/index.tsx b/src/components/index.tsx
index 8367993d9..dc87f4400 100644
--- a/src/components/index.tsx
+++ b/src/components/index.tsx
@@ -61,7 +61,9 @@ import PullRefresh from './PullRefresh';
import Table from './table';
import SchemaVariableListPicker from './schema-editor/SchemaVariableListPicker';
import SchemaVariableList from './schema-editor/SchemaVariableList';
+import VariableList from './formula/VariableList';
import FormulaPicker from './formula/Picker';
+import PickerContainer from './PickerContainer';
import InputJSONSchema from './json-schema';
export {
@@ -128,6 +130,8 @@ export {
Table,
SchemaVariableListPicker,
SchemaVariableList,
+ VariableList,
+ PickerContainer,
FormulaPicker,
InputJSONSchema
};