aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-04-26 18:17:05 -0400
committerIvan Chen <ivan@tagg.id>2021-04-26 18:17:05 -0400
commit96781f389a31162809ff463cc187d56fc3354e49 (patch)
treef07e0f3b89caaf669c49ce1f501ee4dc80cb3377 /src
parentab6e44b9f31b06fbf67511b54eb9752913d47831 (diff)
clear text
Diffstat (limited to 'src')
-rw-r--r--src/screens/chat/NewChatModal.tsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/screens/chat/NewChatModal.tsx b/src/screens/chat/NewChatModal.tsx
index 0b0661f9..9872dd6f 100644
--- a/src/screens/chat/NewChatModal.tsx
+++ b/src/screens/chat/NewChatModal.tsx
@@ -35,6 +35,7 @@ const NewChatModal: React.FC<NewChatModalProps> = ({
Keyboard.dismiss();
};
const handleCancel = () => {
+ setQuery('');
setChatModalVisible(false);
};
@@ -118,7 +119,12 @@ const NewChatModal: React.FC<NewChatModalProps> = ({
<BottomDrawer
initialSnapPosition={'90%'}
isOpen={modalVisible}
- setIsOpen={setChatModalVisible}
+ setIsOpen={(open) => {
+ if (!open) {
+ setQuery('');
+ }
+ setChatModalVisible(open);
+ }}
showHeader={false}>
{_modalContent()}
</BottomDrawer>