Skip to content

Conversation

@glebez
Copy link
Contributor

@glebez glebez commented Jun 28, 2018

This PR fixes renderFooter gifted chat prop not working with the new Flat List implementation of Message Container (#705 ).

Flat List, compared to List View used before, does not recognise renderFooter and renderHeader props, so, although they were passed, they were ignored.

This PR removes above mentioned props and utilises ListHeaderComponent prop which is an alternative of renderHeader for Flat List.

@xcarpentier xcarpentier merged commit 1fedba2 into FaridSafi:master Jun 29, 2018
@glebez
Copy link
Contributor Author

glebez commented Jun 29, 2018

@xcarpentier Thanks a lot for the quick review and merge! I really appreciate what you do here as a maintainer, thanks for all your effort!

chilinh added a commit to chilinh/react-native-gifted-chat that referenced this pull request Jul 18, 2018
* r_master:
  Use IMessage type instead of `any` to define the type of message property (FaridSafi#861)
  chore(package): update prop-types to version 15.6.2 (FaridSafi#907)
  fix(package): update uuid to version 3.3.0 (FaridSafi#913)
  Update InputToolbar.js (FaridSafi#906)
  Improved typings (FaridSafi#916)
  fix: enable renderFooter for FlatList MessageContainer (FaridSafi#914)

# Conflicts:
#	index.d.ts
jessestuart pushed a commit to jessestuart/react-native-gifted-chat that referenced this pull request Aug 9, 2018
renderFooter={this.renderLoadEarlier}
{...this.props.invertibleScrollViewProps}
ListFooterComponent={this.renderHeaderWrapper}
ListHeaderComponent={this.renderFooter}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am i mistaken or are the properties swapped? Shouldn't ListFooterComponent={this.renderFooter}?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the list is inverted, so header becomes footer and vice versa. So they are swapped on purpose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants