Skip to content

Commit 99223a6

Browse files
committed
TextInput: add smartInsertDelete prop, reorder props
1 parent b37cfe5 commit 99223a6

File tree

9 files changed

+148
-60
lines changed

9 files changed

+148
-60
lines changed

docs/textinput.md

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,16 @@ Provides an initial value that will change when the user starts typing. Useful f
322322

323323
---
324324

325+
### `disableKeyboardShortcuts` <div class="label ios">iOS</div>
326+
327+
If `true`, the keyboard shortcuts (undo/redo and copy buttons) are disabled.
328+
329+
| Type | Default |
330+
| ---- | ------- |
331+
| bool | `false` |
332+
333+
---
334+
325335
### `cursorColor` <div class="label android">Android</div>
326336

327337
When provided it will set the color of the cursor (or "caret") in the component. Unlike the behavior of `selectionColor` the cursor color will be set independently from the color of the text selection box.
@@ -525,6 +535,26 @@ The following values work on Android only:
525535

526536
---
527537

538+
### `lineBreakStrategyIOS` <div class="label ios">iOS</div>
539+
540+
Set line break strategy on iOS 14+. Possible values are `none`, `standard`, `hangul-word` and `push-out`.
541+
542+
| Type | Default |
543+
| ----------------------------------------------------------- | -------- |
544+
| enum(`'none'`, `'standard'`, `'hangul-word'`, `'push-out'`) | `'none'` |
545+
546+
---
547+
548+
### `lineBreakModeIOS` <div class="label ios">iOS</div>
549+
550+
Set line break mode on iOS. Possible values are `wordWrapping`, `char`, `clip`, `head`, `middle` and `tail`.
551+
552+
| Type | Default |
553+
| -------------------------------------------------------------------------- | ---------------- |
554+
| enum(`'wordWrapping'`, `'char'`, `'clip'`, `'head'`, `'middle'`, `'tail'`) | `'wordWrapping'` |
555+
556+
---
557+
528558
### `maxFontSizeMultiplier`
529559

530560
Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. Possible values:
@@ -879,6 +909,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
879909

880910
---
881911

912+
### `smartInsertDelete` <div class="label ios">iOS</div>
913+
914+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
915+
916+
| Type | Default |
917+
| ---- | ------- |
918+
| bool | `true` |
919+
920+
---
921+
882922
### `spellCheck` <div class="label ios">iOS</div>
883923

884924
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.
@@ -1060,36 +1100,6 @@ The value to show for the text input. `TextInput` is a controlled component, whi
10601100
| ------ |
10611101
| string |
10621102

1063-
---
1064-
1065-
### `lineBreakStrategyIOS` <div class="label ios">iOS</div>
1066-
1067-
Set line break strategy on iOS 14+. Possible values are `none`, `standard`, `hangul-word` and `push-out`.
1068-
1069-
| Type | Default |
1070-
| ----------------------------------------------------------- | -------- |
1071-
| enum(`'none'`, `'standard'`, `'hangul-word'`, `'push-out'`) | `'none'` |
1072-
1073-
---
1074-
1075-
### `lineBreakModeIOS` <div class="label ios">iOS</div>
1076-
1077-
Set line break mode on iOS. Possible values are `wordWrapping`, `char`, `clip`, `head`, `middle` and `tail`.
1078-
1079-
| Type | Default |
1080-
| -------------------------------------------------------------------------- | ---------------- |
1081-
| enum(`'wordWrapping'`, `'char'`, `'clip'`, `'head'`, `'middle'`, `'tail'`) | `'wordWrapping'` |
1082-
1083-
---
1084-
1085-
### `disableKeyboardShortcuts` <div class="label ios">iOS</div>
1086-
1087-
If `true`, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is `false`.
1088-
1089-
| Type |
1090-
| ---- |
1091-
| bool |
1092-
10931103
## Methods
10941104

10951105
### `.focus()`

website/versioned_docs/version-0.73/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
834834

835835
---
836836

837+
### `smartInsertDelete` <div class="label ios">iOS</div>
838+
839+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
840+
841+
| Type | Default |
842+
| ---- | ------- |
843+
| bool | `true` |
844+
845+
---
846+
837847
### `spellCheck` <div class="label ios">iOS</div>
838848

839849
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.74/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
838838

839839
---
840840

841+
### `smartInsertDelete` <div class="label ios">iOS</div>
842+
843+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
844+
845+
| Type | Default |
846+
| ---- | ------- |
847+
| bool | `true` |
848+
849+
---
850+
841851
### `spellCheck` <div class="label ios">iOS</div>
842852

843853
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.75/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
838838

839839
---
840840

841+
### `smartInsertDelete` <div class="label ios">iOS</div>
842+
843+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
844+
845+
| Type | Default |
846+
| ---- | ------- |
847+
| bool | `true` |
848+
849+
---
850+
841851
### `spellCheck` <div class="label ios">iOS</div>
842852

843853
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.76/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
855855

856856
---
857857

858+
### `smartInsertDelete` <div class="label ios">iOS</div>
859+
860+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
861+
862+
| Type | Default |
863+
| ---- | ------- |
864+
| bool | `true` |
865+
866+
---
867+
858868
### `spellCheck` <div class="label ios">iOS</div>
859869

860870
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.77/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
869869

870870
---
871871

872+
### `smartInsertDelete` <div class="label ios">iOS</div>
873+
874+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
875+
876+
| Type | Default |
877+
| ---- | ------- |
878+
| bool | `true` |
879+
880+
---
881+
872882
### `spellCheck` <div class="label ios">iOS</div>
873883

874884
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.78/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
869869

870870
---
871871

872+
### `smartInsertDelete` <div class="label ios">iOS</div>
873+
874+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
875+
876+
| Type | Default |
877+
| ---- | ------- |
878+
| bool | `true` |
879+
880+
---
881+
872882
### `spellCheck` <div class="label ios">iOS</div>
873883

874884
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.79/textinput.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
873873

874874
---
875875

876+
### `smartInsertDelete` <div class="label ios">iOS</div>
877+
878+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
879+
880+
| Type | Default |
881+
| ---- | ------- |
882+
| bool | `true` |
883+
884+
---
885+
876886
### `spellCheck` <div class="label ios">iOS</div>
877887

878888
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.

website/versioned_docs/version-0.80/textinput.md

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,14 @@ Provides an initial value that will change when the user starts typing. Useful f
320320
| ------ |
321321
| string |
322322

323+
### `disableKeyboardShortcuts` <div class="label ios">iOS</div>
324+
325+
If `true`, the keyboard shortcuts (undo/redo and copy buttons) are disabled.
326+
327+
| Type | Default |
328+
| ---- | ------- |
329+
| bool | `false` |
330+
323331
---
324332

325333
### `cursorColor` <div class="label android">Android</div>
@@ -519,6 +527,26 @@ The following values work on Android only:
519527

520528
---
521529

530+
### `lineBreakModeIOS` <div class="label ios">iOS</div>
531+
532+
Set line break mode on iOS. Possible values are `wordWrapping`, `char`, `clip`, `head`, `middle` and `tail`.
533+
534+
| Type | Default |
535+
| -------------------------------------------------------------------------- | ---------------- |
536+
| enum(`'wordWrapping'`, `'char'`, `'clip'`, `'head'`, `'middle'`, `'tail'`) | `'wordWrapping'` |
537+
538+
---
539+
540+
### `lineBreakStrategyIOS` <div class="label ios">iOS</div>
541+
542+
Set line break strategy on iOS 14+. Possible values are `none`, `standard`, `hangul-word` and `push-out`.
543+
544+
| Type | Default |
545+
| ----------------------------------------------------------- | -------- |
546+
| enum(`'none'`, `'standard'`, `'hangul-word'`, `'push-out'`) | `'none'` |
547+
548+
---
549+
522550
### `maxFontSizeMultiplier`
523551

524552
Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. Possible values:
@@ -873,6 +901,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
873901

874902
---
875903

904+
### `smartInsertDelete` <div class="label ios">iOS</div>
905+
906+
If `false`, the iOS system will not insert an extra space after a paste operation neither delete one or two spaces after a cut or delete operation.
907+
908+
| Type | Default |
909+
| ---- | ------- |
910+
| bool | `true` |
911+
912+
---
913+
876914
### `spellCheck` <div class="label ios">iOS</div>
877915

878916
If `false`, disables spell-check style (i.e. red underlines). The default value is inherited from `autoCorrect`.
@@ -1054,36 +1092,6 @@ The value to show for the text input. `TextInput` is a controlled component, whi
10541092
| ------ |
10551093
| string |
10561094

1057-
---
1058-
1059-
### `lineBreakModeIOS` <div class="label ios">iOS</div>
1060-
1061-
Set line break mode on iOS. Possible values are `wordWrapping`, `char`, `clip`, `head`, `middle` and `tail`.
1062-
1063-
| Type | Default |
1064-
| -------------------------------------------------------------------------- | ---------------- |
1065-
| enum(`'wordWrapping'`, `'char'`, `'clip'`, `'head'`, `'middle'`, `'tail'`) | `'wordWrapping'` |
1066-
1067-
---
1068-
1069-
### `lineBreakStrategyIOS` <div class="label ios">iOS</div>
1070-
1071-
Set line break strategy on iOS 14+. Possible values are `none`, `standard`, `hangul-word` and `push-out`.
1072-
1073-
| Type | Default |
1074-
| ----------------------------------------------------------- | -------- |
1075-
| enum(`'none'`, `'standard'`, `'hangul-word'`, `'push-out'`) | `'none'` |
1076-
1077-
---
1078-
1079-
### `disableKeyboardShortcuts` <div class="label ios">iOS</div>
1080-
1081-
If `true`, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is `false`.
1082-
1083-
| Type |
1084-
| ---- |
1085-
| bool |
1086-
10871095
## Methods
10881096

10891097
### `.focus()`

0 commit comments

Comments
 (0)