react-native-chat-ui icon indicating copy to clipboard operation
react-native-chat-ui copied to clipboard

How to disable date header component

Open skjorrface opened this issue 3 years ago • 5 comments

Is there a way to disable date header component completely? I'm including message time inside a custom message bubble and I would like to disable the date component completely.

skjorrface avatar Jul 07 '22 20:07 skjorrface

This repo is a bit behind the flutter version, and there we have a custom header render, if we don't have it here (I guess possible to just return null) it will be added when I will be soon reviving this repo bringing all things we added in the flutter version.

demchenkoalex avatar Jul 08 '22 07:07 demchenkoalex

@demchenkoalex Thanks for your answer and help, looking at the documentation the only prop I can customize is customDateHeaderText, which returns a string, not a component. Returning "null" inside this prop actually hides the string but not the component itself, which leaves unwanted space between bubbles :-( Is there any other prop tu customize the actual dateHeader component that I'm missing?

skjorrface avatar Jul 08 '22 08:07 skjorrface

Then no, it was added in Flutter but not here. I can prioritise it and release a minor version with dependencies updates and this when I get back to the React Native. In the meantime you can fork and remove it yourself I think, and in the future you will be able to switch back to the lib with the options we will have.

demchenkoalex avatar Jul 08 '22 08:07 demchenkoalex