React-native-gifted-chat: Render Empty chat view getting inverted

Created on 12 Dec 2019  路  11Comments  路  Source: FaridSafi/react-native-gifted-chat

I have tried the new renderChatEmpty, Its working with inverted value as false. When I have the inverted value as true, the empty chat view is getting inverted.
Simulator Screen Shot - iPhone X - 2019-12-12 at 13 06 33

Have a view for renderChatEmpty with a text and make the inverted value to true.

  • react-native-gifted-chat version: 0.12.0
wontfix

Most helpful comment

This is a react-native issue with inverted FlatLists. I've just been using inverted={messages.length !== 0}

All 11 comments

As a _temp_ fix, you can add transform: scaleY(-1) to the root-element of whatever you're rendering (this will rotate it 180掳 once more).

This is a react-native issue with inverted FlatLists. I've just been using inverted={messages.length !== 0}

@StagasaurusRex do you think it's needed into this lib.
If yes, PR? ;)

Would it make sense to add these styles in the root component if the list of messages is empty? So, we don't need to make that hack ourselves. Could it be that there is a case where is make sense to have it inverted?

FYI, i've added the following code and it works:
messagesContainerStyle={{ transform: [ { scaleY: -1 } ] }}

Yes, it's a great idea! But I have no time now.
If anyone can handle it by creating a PR I will be honored to review and merge :)

@xcarpentier sure will do

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue is still a problem in the newest version. Why is it marked as wontfix?

In case anyone else experiences this, add this style to your enclosing element:

{ transform: [{ scaleY: -1 }], backgroundColor: ... }

@schumannd sorry for tagging you, but I just wanted to say that the last release on npm is December 16, 2019 so it's not the latest version yet using npm i

problem is still here in 0.16.1

still the problem on 0.16.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cerberusv2px picture cerberusv2px  路  3Comments

iamdurui picture iamdurui  路  3Comments

pentarex picture pentarex  路  3Comments

SytzeAndr picture SytzeAndr  路  3Comments

inceptivetech picture inceptivetech  路  3Comments