Dismiss keyboard on send

This commit is contained in:
virvar 2016-04-19 11:07:07 +03:00
parent 173752ea2c
commit 9f1c71c451
3 changed files with 8 additions and 3 deletions

View File

@ -13,7 +13,8 @@
"react-native-action-button", "react-native-action-button",
"react-native-vector-icons/Ionicons", "react-native-vector-icons/Ionicons",
"react-native-circle-checkbox", "react-native-circle-checkbox",
"react-native-randombytes" "react-native-randombytes",
"dismissKeyboard"
], ],
"imageDirs": [ "imageDirs": [
"images" "images"

View File

@ -4,7 +4,8 @@
view view
image image
touchable-highlight touchable-highlight
text-input]] text-input
dismiss-keyboard]]
[syng-im.components.styles :refer [font [syng-im.components.styles :refer [font
text2-color text2-color
color-white color-white
@ -25,7 +26,8 @@
input-message]) input-message])
(dispatch [:send-chat-msg chat-id (dispatch [:send-chat-msg chat-id
input-message]))) input-message])))
(set-input-message nil)) (set-input-message nil)
(dismiss-keyboard))
(defn plain-message-input-view [] (defn plain-message-input-view []
(let [chat (subscribe [:get-current-chat]) (let [chat (subscribe [:get-current-chat])

View File

@ -20,6 +20,8 @@
(defn list-item [component] (defn list-item [component]
(r/as-element component)) (r/as-element component))
(def dismiss-keyboard (js/require "dismissKeyboard"))
(comment (comment
(.-width (.get (.. js/React -Dimensions) "window")) (.-width (.get (.. js/React -Dimensions) "window"))
) )