From 86b9ac0bd870b7d274188f1d28832b5b5a07daf5 Mon Sep 17 00:00:00 2001 From: jim Date: Fri, 1 Jun 2018 12:37:55 +0800 Subject: [PATCH] fix tagselect bug --- src/components/TagSelect/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/TagSelect/index.js b/src/components/TagSelect/index.js index c4ea4955..83acfa1f 100644 --- a/src/components/TagSelect/index.js +++ b/src/components/TagSelect/index.js @@ -17,8 +17,9 @@ TagSelectOption.isTagSelectOption = true; class TagSelect extends Component { static getDerivedStateFromProps(nextProps) { if ('value' in nextProps && nextProps.value) { - this.setState({ value: nextProps.value }); + return { value: nextProps.value }; } + return null; } state = { -- GitLab