Replies: 1 comment 1 reply
-
Yes, but it caused some issues such as this #867 So I'm partially agree, that
Yes, you can render many instances of
No, it's not supposed usage. You'll deal with various offset issues and it will not work as expected.
Yes, unfortunately it makes setup more complex. So if you want to make a management of
Yes, with current architecture I believe this is the only one option (but instead of context you can use state management lib that you use in your current app). What would be the idea solution that you would like to have? Render multiple |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I'm looking into trying KeyboardToolbar but can't really wrap my head around how it works.
The examples show it as basically one toolbar per screen, but my usecase is a bit different. I have a custom TextInput wrapper with a bunch of props, some of them which should effect the toolbar. So my initial idea was to just add a KeyboardToolbar to the Input wrapper and handle all the logic locally. Then each input could have its own toolbar with content specific to that specific input.
But this seems to lead to very weird offset issues, as it seems the KeyboardToolbar component was meant to be placed OUTSIDE of the scrollview, not inside.
Am I thinking about this all wrong? Is it possible to have multiple KeyboardToolbars, and inside the ScrollView? I guess I would need to keep track of the Input isFocused state and conditionally render the toolbar? But then the toolbar would disappear before the keyboard animates away, and it would require additional listening to events and delaying unmount etc.
Another option would of course be to only use one KeyboardToolbar and introduce some sort of custom KeyboardToolbarContext, that the inputs, if they are focused, would write their toolbar requirements to. But that feels needlessly complex as well.
What are my options? One of the above or something more obvious that I am missing?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions