Input field takes 3 lines for 1-line browse command [webview-command-actions] (#1155)
This commit is contained in:
parent
ff59f8a375
commit
bdd2c3aa14
|
@ -53,12 +53,14 @@
|
|||
:width container-width
|
||||
:height min-input-height})
|
||||
|
||||
(defnstyle input-view [content-height]
|
||||
(defnstyle input-view [content-height single-line-input?]
|
||||
{:flex 1
|
||||
:font-size 14
|
||||
:padding-top 5
|
||||
:padding-bottom 5
|
||||
:height (+ (min (max min-input-height content-height) max-input-height))
|
||||
:height (if single-line-input?
|
||||
min-input-height
|
||||
(+ (min (max min-input-height content-height) max-input-height)))
|
||||
:android {:padding-top 3}})
|
||||
|
||||
(def invisible-input-text
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
:show-emoji? false}])
|
||||
:on-blur #(do (dispatch [:set-chat-ui-props {:input-focused? false}]))
|
||||
:on-submit-editing (fn [e]
|
||||
(when single-line-input?
|
||||
(if single-line-input?
|
||||
(dispatch [:send-current-message])
|
||||
(.setNativeProps @input-ref (clj->js {:text (str @input-text "\n")}))))
|
||||
:on-layout (fn [e]
|
||||
|
@ -111,7 +111,7 @@
|
|||
(when (and (= (.-end s) (+ 2 (count (get-in @command [:command :name]))))
|
||||
(get-in @command [:command :sequential-params]))
|
||||
(dispatch [:chat-input-focus :seq-input-ref])))
|
||||
:style (style/input-view height)
|
||||
:style (style/input-view height single-line-input?)
|
||||
:placeholder-text-color style/color-input-helper-placeholder
|
||||
:auto-capitalize :sentences}])))
|
||||
|
||||
|
|
Loading…
Reference in New Issue