[TextInput] Supply access to UITextView.inputAccessoryView attribute on <TextInput />
It would be cool to have this to make sticky text inputs.
(t21661353)
Yes definitely - this is how we built parts of the comment input in the Groups app. Hopefully we'll be able to clean it up soon and release it to you guys.
@sahrens do you have code you could throw over the wall that I could take a pass at cleaning up?
@sahrens - this would be great to see, this seems to be a highly requested feature
I'll take a look at what we have.
On May 31, 2015, at 11:25 AM, Brent Vatne [email protected] wrote:
@sahrens - this would be great to see, this seems to be a highly requested feature
— Reply to this email directly or view it on GitHub.
Was there any luck with this? @sahrens , @auser (https://github.com/facebook/react-native/issues/1190)?
+1 for solving this
Not yet, but would be a good idea to get back on this...
I have an initial implementation in progress that is not quite ready yet. When I get it working, I'll gist it. I'm currently working on it as a component (outside of the main repo), but will plan on making it a pull req when it is functional. Also... the API might need some help...
+1
+1
+1
Sounds great, @auser - looking forward to that PR ;)
I've been playing around with tying an inputAccessoryView with RN. One thing I immediately noticed is that when using the navigator component, keyboard dismissal isn't as clean as with UINavigationController. An example of the regular behavior:

Notice how the keyboard slides away in tandem with the view as the controller is popped? Using the navigator component, there's no direct correlation and so the keyboard stays in place (or slides downward if you preemptively dismiss). The reason why I bring this up is because when using an InputAccessoryView, this difference becomes much more amplified, because the content of the view is usually much more scene-specific than the generic keyboard.
Any suggestions? I looked all over the groups app, and couldn't find a place where the navigation slides in a way that would reveal this issue.
cc @ericvicenti @hedgerwang @ide - interesting point raised above by @sjmueller
also cc @boourns - maybe your team could look at this too :)
Great point and quite tricky I believe. Since we don't want to use UINavigationController and UIViewController we're going to need to move the keyboard ourselves. Should be possible by getting the UIWindow that contains the keyboard and applying a transform to it. Certainly yet another thing to consider for Navigator scenes.
Agreed, this will be very tricky. Even if we have the ability to animate the keyboard from RN, the off-thread operation will cause the keyboard animation to lag.
@javache, any idea if we can add hooks to animate the keyboard from RN?
cc @sahrens for the main-thread animation concerns
Yeah, messy. Native animations won't handle this any time soon. Might be worth some custom native hook to link the keyboard to a view based on react node handle? On Sep 10, 2015 2:13 PM, "Eric Vicenti" [email protected] wrote:
Agreed, this will be very tricky. Even if we have the ability to animate the keyboard from RN, the off-thread operation will cause the keyboard animation to lag.
@javache https://github.com/javache, any idea if we can add hooks to animate the keyboard from RN?
cc @sahrens https://github.com/sahrens for the main-thread animation concerns
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/371#issuecomment-139380634 .
We have an inputAccessoryView prototype internally that would solve this problem, but there were some concerns about performance that have stopped us from shipping it. I'll see if we can revisit that.
@nicklockwood, curious what approach is used with the fb prototype? Like @ide says, there's no UINavigationController and UIViewController with the Navigator component, so it'd be interesting to learn about the way you're currently solving the challenge.
If it's easier to make it work with NavigatorIOS then let's have that first, please. It's a show stopper in apps that take numeric input for the user not to be able to signal "done" explicitly.
+1
Update: I just finished adding a nice co-animated 'done' button above the numeric keypad, but it took me two days to perfect it and make it work across all screen resolutions. It's a big hole in React Native's functionality. It's such a basic must have feature.