You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/10/21 14:59:48 UTC

[apisix-dashboard] branch master updated: fix: lose focus when input in route step1 (#582)

This is an automated email from the ASF dual-hosted git repository.

juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new d31a7e6  fix: lose focus when input in route step1 (#582)
d31a7e6 is described below

commit d31a7e66874c877bbd4104159d002e50a0d6788d
Author: litesun <7s...@gmail.com>
AuthorDate: Wed Oct 21 22:59:39 2020 +0800

    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 c61553d..69ae614 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<RouteModule.Step1PassProps> = ({
       <Form.Item
         noStyle
         shouldUpdate={(prev, next) => {
-          onChange({ action: 'redirectOptionChange', data: next.redirectOption });
+          if (prev.redirectOption !== next.redirectOption) {
+            onChange({ action: 'redirectOptionChange', data: next.redirectOption });
+          }
           return prev.redirectOption !== next.redirectOption;
         }}
       >