From 2f6288b517500d372d1d14692ab43f30adb00aca Mon Sep 17 00:00:00 2001 From: kenve Date: Mon, 3 Dec 2018 10:57:11 +0800 Subject: [PATCH] fix: TagSelect can't clear value when Form run resetFields (#3031) --- src/components/TagSelect/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TagSelect/index.js b/src/components/TagSelect/index.js index c36cd672..f65764f5 100644 --- a/src/components/TagSelect/index.js +++ b/src/components/TagSelect/index.js @@ -28,8 +28,8 @@ class TagSelect extends Component { } static getDerivedStateFromProps(nextProps) { - if ('value' in nextProps && nextProps.value) { - return { value: nextProps.value }; + if ('value' in nextProps) { + return { value: nextProps.value || [] }; } return null; } -- GitLab