Commit 8c882b4
feat: added enterKeyHint prop to textInput (#34482)
Summary:
This adds the `enterKeyHint` prop to the TextInput component as requested on #34424, mapping web [enterKeyHint types](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/enterkeyhint) to equivalent [returnKeyType](https://reactnative.dev/docs/textinput#returnkeytype) values. This PR also updates RNTester TextInputExample in order to facilitate the manual QA.
## Open questions
- What should be the `returnType` in the case of `previous` in iOS?
- what should happen if `enterKeyHint` and `returnKeyType` props are passed together?
## Changelog
[General] [Added] - Add enterKeyHint prop to TextInput component
Pull Request resolved: #34482
Test Plan:
- Open the RNTester app and navigate to the TextInput page
- Test the TextInput component through the `enterKeyHint modes section`
<image src="https://user-images.githubusercontent.com/22423684/186191205-9c04732e-568c-4cce-9564-50a84d70dca3.png" height="600px" width="300px" />
Reviewed By: GijsWeterings
Differential Revision: D38957275
Pulled By: necolas
fbshipit-source-id: d75f2c2000df5d9606a005083b20bf3a23b488311 parent 38e1e25 commit 8c882b4
File tree
2 files changed
+62
-0
lines changed- Libraries/Components/TextInput
- packages/rn-tester/js/examples/TextInput
2 files changed
+62
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
210 | 219 | | |
211 | 220 | | |
212 | 221 | | |
| |||
543 | 552 | | |
544 | 553 | | |
545 | 554 | | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
546 | 570 | | |
547 | 571 | | |
548 | 572 | | |
| |||
1388 | 1412 | | |
1389 | 1413 | | |
1390 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
1391 | 1425 | | |
1392 | 1426 | | |
1393 | 1427 | | |
| |||
1398 | 1432 | | |
1399 | 1433 | | |
1400 | 1434 | | |
| 1435 | + | |
| 1436 | + | |
1401 | 1437 | | |
1402 | 1438 | | |
1403 | 1439 | | |
| |||
1410 | 1446 | | |
1411 | 1447 | | |
1412 | 1448 | | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
1413 | 1452 | | |
1414 | 1453 | | |
1415 | 1454 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
730 | 753 | | |
731 | 754 | | |
732 | 755 | | |
| |||
0 commit comments