Commit 5bf3e38
Drop boolean support for ScrollView keyboardShouldPersistTaps (#57386)
Summary:
Removes support for the deprecated boolean values of `ScrollView`'s `keyboardShouldPersistTaps` prop. `true`/`false` have long been deprecated in favor of the string values `'always'`/`'never'` (with `'handled'` as a third option), and a runtime warning was already emitted when a boolean was passed. This drops the boolean from the type and removes the now-unused boolean handling.
Migration:
- `keyboardShouldPersistTaps={true}` → `keyboardShouldPersistTaps="always"`
- `keyboardShouldPersistTaps={false}` → `keyboardShouldPersistTaps="never"`
See #57384
## Changelog:
[GENERAL] [BREAKING] - Remove deprecated boolean values support for `ScrollView` `keyboardShouldPersistTaps`
Pull Request resolved: #57386
Test Plan:
- `yarn flow` passes (the previously-needed `$FlowFixMe[sketchy-null-bool]` suppressions are gone).
- `yarn build-types` regenerates `ReactNativeApi.d.ts` with `keyboardShouldPersistTaps?: "always" | "handled" | "never"`.
- RNTester ScrollView "Keyboard" example still toggles between `never`/`always`/`handled`.
Reviewed By: cortinico, rozele
Differential Revision: D110218873
Pulled By: Abbondanzo
fbshipit-source-id: 2cb86fe8b058432795cddc3f4f2c2cb1b1fd1fdf1 parent 0fae86d commit 5bf3e38
4 files changed
Lines changed: 17 additions & 50 deletions
File tree
- packages/react-native
- Libraries
- Components/ScrollView
- Lists
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
674 | | - | |
675 | | - | |
676 | 674 | | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
| 675 | + | |
683 | 676 | | |
684 | 677 | | |
685 | 678 | | |
| |||
Lines changed: 1 addition & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
585 | | - | |
586 | 584 | | |
587 | 585 | | |
588 | 586 | | |
589 | | - | |
| 587 | + | |
590 | 588 | | |
591 | 589 | | |
592 | 590 | | |
| |||
888 | 886 | | |
889 | 887 | | |
890 | 888 | | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | 889 | | |
903 | 890 | | |
904 | 891 | | |
| |||
1483 | 1470 | | |
1484 | 1471 | | |
1485 | 1472 | | |
1486 | | - | |
1487 | 1473 | | |
1488 | 1474 | | |
1489 | 1475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 32 | + | |
| 33 | + | |
41 | 34 | | |
42 | 35 | | |
43 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
4369 | 4369 | | |
4370 | 4370 | | |
4371 | 4371 | | |
4372 | | - | |
4373 | | - | |
4374 | | - | |
4375 | | - | |
4376 | | - | |
4377 | | - | |
| 4372 | + | |
4378 | 4373 | | |
4379 | 4374 | | |
4380 | 4375 | | |
| |||
5926 | 5921 | | |
5927 | 5922 | | |
5928 | 5923 | | |
5929 | | - | |
| 5924 | + | |
5930 | 5925 | | |
5931 | 5926 | | |
5932 | 5927 | | |
| |||
5976 | 5971 | | |
5977 | 5972 | | |
5978 | 5973 | | |
5979 | | - | |
5980 | | - | |
5981 | | - | |
| 5974 | + | |
| 5975 | + | |
| 5976 | + | |
5982 | 5977 | | |
5983 | 5978 | | |
5984 | 5979 | | |
| |||
6118 | 6113 | | |
6119 | 6114 | | |
6120 | 6115 | | |
6121 | | - | |
| 6116 | + | |
6122 | 6117 | | |
6123 | 6118 | | |
6124 | | - | |
| 6119 | + | |
6125 | 6120 | | |
6126 | 6121 | | |
6127 | 6122 | | |
6128 | 6123 | | |
6129 | | - | |
| 6124 | + | |
6130 | 6125 | | |
6131 | | - | |
6132 | | - | |
| 6126 | + | |
| 6127 | + | |
6133 | 6128 | | |
6134 | 6129 | | |
6135 | 6130 | | |
| |||
6203 | 6198 | | |
6204 | 6199 | | |
6205 | 6200 | | |
6206 | | - | |
| 6201 | + | |
6207 | 6202 | | |
6208 | 6203 | | |
6209 | | - | |
| 6204 | + | |
6210 | 6205 | | |
6211 | 6206 | | |
6212 | 6207 | | |
| |||
0 commit comments