From f3f3919c3470072e933469c626742eb22e319192 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 26 Aug 2021 09:44:02 +0800 Subject: [PATCH] fix: remove transfer warning #4574 --- components/transfer/index.tsx | 4 ++-- components/transfer/list.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 636f5de41..e25d810bd 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -15,8 +15,8 @@ import { withInstall } from '../_util/type'; export type TransferDirection = 'left' | 'right'; export const TransferItem = { - key: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, + key: PropTypes.string, + title: PropTypes.string, description: PropTypes.string, disabled: PropTypes.looseBool, }; diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index fac83da9a..9e7a6aa00 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -14,8 +14,8 @@ import type { RadioChangeEvent } from '../radio/interface'; const defaultRender = () => null; const TransferItem = { - key: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, + key: PropTypes.string, + title: PropTypes.string, description: PropTypes.string, disabled: PropTypes.looseBool, };