Is there a way to completely hide the text input that appears at the bottom of GiftedChat? I have a use case where messages are generated automatically by the server and I want to display these messages using GiftedChat, but a user of the app cannot create any new messages. So I want to completely hide the text input, i.e. not render <InputToolbar> at all, and there should be no way for a user to activate the keyboard etc.
I thought I might have been able to use the renderInputToolbar() prop to achieve this by doing renderInputToolbar={() => null}. While this does cause <InputToolbar> to not be rendered, it leaves a blank space where the <InputToolbar> would have been rendered and I can't seem to find a way to get the <MessageContainer> to fill this blank space.
@jordanmkoncz try renderComposer
@kfiroo I tried doing renderComposer={() => null}, and while this does mean that the composer is no longer rendered, I still have the same issue as the <InputToolbar> is still rendered and taking up space, it just doesn't have the composer rendered inside of it.
@jordanmkoncz The issue is that the message container always accounts for the input height, regardless if it visible or not:
https://github.com/FaridSafi/react-native-gifted-chat/blob/master/src/GiftedChat.js#L322
@Cederman Yep that's what I found while experimenting with different options for trying to hide the text input. Any suggestions on how I could achieve this?
Hello,
renderInputToolbar={() => null}
renderComposer={() => null}
minInputToolbarHeight={0}
is working fine for me !
If you miss any of the steps then you are doomed.
Most helpful comment
Hello,
is working fine for me !