Is it possible to disable the text input including the send button completely for the react-native-gifted-chat component?
This is my current component:
<GiftedChat text={emergencyText} onInputTextChanged={this.setEmergencyText} />
I could override the render methods, but how do I then render the original input?
Since React-native-gifted-chat does not have the disable props for it provides one more component, that is InputToolbar, if we render null value to we can almost disable the sending feature. just try the below code.
<InputToolbar
render={null}
text={emergencyText}
onInputTextChanged={this.setEmergencyText}
/>
It serves your purpose.
You can use the disableComposer prop.
<GiftedChat disableComposer={true} text={emergencyText} onInputTextChanged={this.setEmergencyText} />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With