Skip to content

Conversation

@chrisy-lili
Copy link
Contributor

No description provided.

render: function () {
return (
<FlatList
ref='_rnkasv_keyboardView'
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should use callback refs instead of string refs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

strings are used in the existing KeyboardAwareScrollView and KeyboardAwareListView components. KeyboardAwareMixin also references ref as this.refs._rnkasv_keyboardView, which I think should be this._rnkasv_keyboardView for callback refs. Do you want me to update everywhere to use callback refs in this PR? Or, leave it as is, and open another PR to switch to callback refs?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@alvaromb How do you think about @chrisy-lili 's suggestion? We could have another PR for refs change.

@Swordsman-Inaction
Copy link
Collaborator

@chrisy-lili Would you like to update this PR for Android Support? Check KeyboardAwareScrollView's source code, I just add some codes for Android Support.

@chrisy-lili
Copy link
Contributor Author

@Swordsman-Inaction I've updated the PR with android support based on your changes in the other component. Thanks for pointing me to that update. This PR is ready for review again :)

@Swordsman-Inaction
Copy link
Collaborator

@alvaromb Can you review this again? I think we can change string refs later.

It's ready to release a new version after merging this PR.

@alvaromb
Copy link
Collaborator

alvaromb commented Aug 1, 2017

@Swordsman-Inaction done!

Are we ready to release?

@Swordsman-Inaction Swordsman-Inaction merged commit 9973a7e into APSL:master Aug 2, 2017
@Swordsman-Inaction
Copy link
Collaborator

@alvaromb Yes! 👏

@quadsurf
Copy link

quadsurf commented Oct 1, 2017

what's the status on this? pls also ensure support for when the FlatList has the '''inverted''' prop enabled (expected behavior is that the scroll event will travel in the reverse or opposite direction)

this would be a very common use case for chat-based apps

@alvaromb
Copy link
Collaborator

alvaromb commented Oct 2, 2017

It's ready, but I'm still changing some things before releasing it. See this: #163

@avennn
Copy link

avennn commented Jan 12, 2018

Is there an example to show how to use KeyboardAwareFlatList? It always reponses that this.refs._rnkasv_keyboardView.getScrollResponder is not a function.

@alvaromb
Copy link
Collaborator

It's this. _rnkasv_keyboardView, remove refs.

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

Labels

None yet

6 participants