fix: inability to input data while routes are loading (#20298)
fix: inability to input data while routes are loading (#20298)
This commit is contained in:
parent
3634edab42
commit
0d2869bfe0
|
@ -376,18 +376,17 @@
|
||||||
max-decimals (if crypto-currency? crypto-decimals 2)
|
max-decimals (if crypto-currency? crypto-decimals 2)
|
||||||
regex-pattern (str "^\\d*\\.?\\d{0," max-decimals "}$")
|
regex-pattern (str "^\\d*\\.?\\d{0," max-decimals "}$")
|
||||||
regex (re-pattern regex-pattern)]
|
regex (re-pattern regex-pattern)]
|
||||||
(when (and (not loading-routes?)
|
(when (re-matches regex new-text)
|
||||||
(re-matches regex new-text))
|
|
||||||
(debounce/clear-all)
|
(debounce/clear-all)
|
||||||
(set-just-toggled-mode? false)
|
(set-just-toggled-mode? false)
|
||||||
(set-input-state #(controlled-input/add-character % c)))))
|
(set-input-state #(controlled-input/add-character % c)))))
|
||||||
:on-delete (fn []
|
:on-delete (fn []
|
||||||
(when-not loading-routes?
|
|
||||||
(debounce/clear-all)
|
(debounce/clear-all)
|
||||||
(set-just-toggled-mode? false)
|
(set-just-toggled-mode? false)
|
||||||
(set-input-state controlled-input/delete-last)))
|
(set-input-state controlled-input/delete-last)
|
||||||
|
(rf/dispatch [:wallet/clean-suggested-routes]))
|
||||||
:on-long-press-delete (fn []
|
:on-long-press-delete (fn []
|
||||||
(when-not loading-routes?
|
|
||||||
(debounce/clear-all)
|
(debounce/clear-all)
|
||||||
(set-just-toggled-mode? false)
|
(set-just-toggled-mode? false)
|
||||||
(set-input-state controlled-input/delete-all)))}]]))
|
(set-input-state controlled-input/delete-all)
|
||||||
|
(rf/dispatch [:wallet/clean-suggested-routes]))}]]))
|
||||||
|
|
Loading…
Reference in New Issue