From d31a7e66874c877bbd4104159d002e50a0d6788d Mon Sep 17 00:00:00 2001 From: litesun <7sunmiao@gmail.com> Date: Wed, 21 Oct 2020 22:59:39 +0800 Subject: [PATCH] fix: lose focus when input in route step1 (#582) --- src/pages/Route/components/Step1/RequestConfigView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/Route/components/Step1/RequestConfigView.tsx b/src/pages/Route/components/Step1/RequestConfigView.tsx index c61553d012..69ae614042 100644 --- a/src/pages/Route/components/Step1/RequestConfigView.tsx +++ b/src/pages/Route/components/Step1/RequestConfigView.tsx @@ -221,7 +221,9 @@ const RequestConfigView: React.FC = ({ { - onChange({ action: 'redirectOptionChange', data: next.redirectOption }); + if (prev.redirectOption !== next.redirectOption) { + onChange({ action: 'redirectOptionChange', data: next.redirectOption }); + } return prev.redirectOption !== next.redirectOption; }} >