Disable input field on send asset page (#20564)

This commit is contained in:
Volodymyr Kozieiev 2024-06-28 13:27:38 +01:00 committed by GitHub
parent e92da6d24b
commit 3e268936f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 44 additions and 37 deletions

View File

@ -81,8 +81,9 @@
(js->clj :keywordize-keys true)
(on-selection-change))))]
(fn [{:keys [token customization-color show-keyboard? crypto? currency value error? selection
handle-on-swap]
:or {show-keyboard? true}}]
handle-on-swap allow-selection?]
:or {show-keyboard? true
allow-selection? true}}]
(let [theme (quo.theme/use-theme)
window-width (:width (rn/get-window))]
[rn/pressable
@ -107,7 +108,8 @@
:selection-color customization-color
:show-soft-input-on-focus show-keyboard?
:on-selection-change handle-selection-change
:selection (clj->js selection)}
:selection (clj->js selection)
:editable allow-selection?}
controlled-input? (assoc :value value)
(not controlled-input?) (assoc :default-value value-internal))]
[token-name-text theme (if crypto? token currency)]]]

View File

@ -23,6 +23,8 @@
:options [{:key :usd}
{:key :eur}]}
{:key :error?
:type :boolean}
{:key :allow-selection?
:type :boolean}])
(defn view
@ -33,7 +35,8 @@
:networks networks
:title title
:customization-color :blue
:show-keyboard? false})
:show-keyboard? false
:allow-selection? true})
value (reagent/atom "")
set-value (fn [v]
(swap! value str v))

View File

@ -365,7 +365,8 @@
:show-keyboard? false
:value input-amount
:on-swap swap-between-fiat-and-crypto
:on-token-press show-select-asset-sheet}]
:on-token-press show-select-asset-sheet
:allow-selection? false}]
[routes/view
{:token token-by-symbol
:input-value input-amount

View File

@ -185,7 +185,8 @@
:conversion conversion-rate
:show-keyboard? false
:value (controlled-input/input-value input-state)
:on-swap swap-between-fiat-and-crypto}]
:on-swap swap-between-fiat-and-crypto
:allow-selection? false}]
[quo/disclaimer
{:on-change (fn [checked?]
(set-is-amount-locked checked?))