diff --git a/README.md b/README.md index cc66a12..1e1c071 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,7 @@ e.g. System Message * **`messageIdGenerator`** _(Function)_ - Generate an id for new messages. Defaults to UUID v4, generated by [uuid](https://github.com/kelektiv/node-uuid) * **`user`** _(Object)_ - User sending the messages: `{ _id, name, avatar }` * **`onSend`** _(Function)_ - Callback when sending a message +* **`alwaysShowSend`** _(Bool)_ - Always show send button in input text composer; default `false`, show only when text input is not empty * **`locale`** _(String)_ - Locale to localize the dates * **`timeFormat`** _(String)_ - Format to use for rendering times; default is `'LT'` * **`dateFormat`** _(String)_ - Format to use for rendering dates; default is `'ll'` diff --git a/src/Send.js b/src/Send.js index 3c201f5..725f909 100644 --- a/src/Send.js +++ b/src/Send.js @@ -5,8 +5,8 @@ import React from 'react'; import { StyleSheet, Text, TouchableOpacity, View, ViewPropTypes } from 'react-native'; import Color from './Color'; -export default function Send({ text, containerStyle, onSend, children, textStyle, label }) { - if (text.trim().length > 0) { +export default function Send({ text, containerStyle, onSend, children, textStyle, label, alwaysShowSend }) { + if (alwaysShowSend || text.trim().length > 0) { return (