Skip to content

Commit

Permalink
fix: debounce password input
Browse files Browse the repository at this point in the history
  • Loading branch information
yqrashawn committed Feb 6, 2024
1 parent 2e7a9c8 commit 7270137
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[react-native.core :as rn]
[status-im.common.standard-authentication.forgot-password-doc.view :as forgot-password-doc]
[status-im.common.standard-authentication.password-input.style :as style]
[utils.debounce :as debounce]
[utils.i18n :as i18n]
[utils.re-frame :as rf]
[utils.security.core :as security]))
Expand All @@ -22,8 +23,9 @@

(defn- on-change-password
[entered-password]
(rf/dispatch [:set-in [:profile/login :password]
(security/mask-data entered-password)])
(debounce/debounce-and-dispatch [:set-in [:profile/login :password]
(security/mask-data entered-password)]
100)
(rf/dispatch [:set-in [:profile/login :error] ""]))

(defn- view-internal
Expand Down

0 comments on commit 7270137

Please sign in to comment.