From d72f825f43365dc77e66ede4b09808ed2f55d73d Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 17 Sep 2019 14:43:08 +0800 Subject: [PATCH] :bug: revert to class component to avoid ref warning close #18707 --- components/upload/Dragger.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/upload/Dragger.tsx b/components/upload/Dragger.tsx index a5abc14276..6e9f4da1a4 100644 --- a/components/upload/Dragger.tsx +++ b/components/upload/Dragger.tsx @@ -4,8 +4,11 @@ import { UploadProps } from './interface'; export type DraggerProps = UploadProps & { height?: number }; -const Dragger: React.FC = props => ( - -); - -export default Dragger; +// stick class comoponent to avoid React ref warning inside Form +// https://github.com/ant-design/ant-design/issues/18707 +export default class Dragger extends React.Component { + render() { + const { props } = this; + return ; + } +}