From f389e315a6a5ccfc612cf6d6e856a14a35412ffd Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 22 Jan 2019 14:33:30 +0100 Subject: [PATCH] dismiss soft keyboard upon claim button press --- app/src/component/customRewardCard/view.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/component/customRewardCard/view.js b/app/src/component/customRewardCard/view.js index dda1c0a..f0b1091 100644 --- a/app/src/component/customRewardCard/view.js +++ b/app/src/component/customRewardCard/view.js @@ -1,6 +1,6 @@ // @flow import React from 'react'; -import { ActivityIndicator, Text, TextInput, TouchableOpacity, View } from 'react-native'; +import { ActivityIndicator, Keyboard, Text, TextInput, TouchableOpacity, View } from 'react-native'; import Colors from '../../styles/colors'; import Icon from 'react-native-vector-icons/FontAwesome5'; import Button from '../button'; @@ -31,6 +31,8 @@ class CustomRewardCard extends React.PureComponent { const { canClaim, notify, submitRewardCode } = this.props; const { rewardCode } = this.state; + Keyboard.dismiss(); + if (!canClaim) { notify({ message: 'Unfortunately, you are not eligible to claim this reward at this time.' }); return;