-
Notifications
You must be signed in to change notification settings - Fork 13
React Native: include a pattern for linking labels with text inputs #4
Comments
Hi Pandu, Thanks for your interest in the code samples and for opening this issue. Ideally, you would want to use the For React Native, I believe the Hiding the My experience in React Native is limited to say if there are better options. I will try to get a React Native developer to check this issue. |
This is my team's approach in RN as well. Seems like a valid solution to have it work regardless of OS |
Hi all, many thanks for your input! I will experiment with the Unless you think this pattern should be documented, I believe we can close this issue. Thanks again. |
An update from my side: I've gone ahead with updating to RN 0.71 and using the pattern I outlined earlier. Works great on both iOS and Android, but on Android/TalkBack the label gets skipped if there is a placeholder present. Now in general I would avoid placeholders for reasons such as that people might need the example in the placeholder as reference (i.e. a date format) and typing into the field replaces the placeholder, but nevertheless I assume that the behaviour displayed by TalkBack is not expected and less than ideal. Do we know of any workarounds to address this? EDIT: see facebook/react-native#26739 |
Hi @pandu-supriyono , I'm wondering if you have made any progress and/or new insights in linking labels with text inputs in Reaact Native? |
Hi @JJdeGroot, unfortunately there hasn't been any progress from my side since my last update. I am picking up work and testing on this again soon, so perhaps something may come out of it. |
Hi,
Thanks for these resources. I have little experience with building native apps so this definitely comes in handy.
I'm trying to find an idiomatic and isomorphic way of assigning labels with associated inputs. In the page input-label.md it is suggested to link a
<Text>
with<TextInput>
, but no pattern is provided on how to actually achieve this.Additionally, React Native Paper is provided as an example but for a beginner it is difficult to figure out how they implemented their
<TextInput>
in their source code. I am also critical of this particular example because of their use of floating input label for reasons illustrated in this article by Adam Silver (as well as other sources online).I am currently looking online in other projects' source codes on how this is achieved and experimenting/testing myself. I'm definitely willing to contribute to this page once I have a better idea if you agree that this is something we might want to add in the documentation.
For now: do you have any extra resources or tips with regards to linking labels with text inputs in React Native?
EDIT: my naive implementation (React Native >= 0.71) would be something along the lines of
The text was updated successfully, but these errors were encountered: