From 74133d18af3093ea34c159d8da4a4831c3b23239 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 26 Aug 2021 09:57:37 +0800 Subject: [PATCH] fix: remove transfer warning #4574 --- components/transfer/index.jsx | 4 ++-- components/transfer/list.jsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/transfer/index.jsx b/components/transfer/index.jsx index 0d7967545..45bd9cb92 100644 --- a/components/transfer/index.jsx +++ b/components/transfer/index.jsx @@ -19,8 +19,8 @@ import Base from '../base'; export const 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.bool, }; diff --git a/components/transfer/list.jsx b/components/transfer/list.jsx index 8111509d9..8bb81c74b 100644 --- a/components/transfer/list.jsx +++ b/components/transfer/list.jsx @@ -11,8 +11,8 @@ import addEventListener from '../vc-util/Dom/addEventListener'; const defaultRender = () => null; const TransferItem = { - key: PropTypes.string.isRequired, - title: PropTypes.string.isRequired, + key: PropTypes.string, + title: PropTypes.string, description: PropTypes.string, disabled: PropTypes.bool, };