Skip to content

Commit 032ea6a

Browse files
authored
TextInput: add smartInsertDelete prop, reorder props (#4704)
1 parent 412e0d4 commit 032ea6a

File tree

6 files changed

+118
-60
lines changed

6 files changed

+118
-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 className="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 className="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 className="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 className="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 className="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 className="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 className="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 className="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 className="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.77/textinput.md

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

876876
---
877877

878+
### `smartInsertDelete` <div className="label ios">iOS</div>
879+
880+
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.
881+
882+
| Type | Default |
883+
| ---- | ------- |
884+
| bool | `true` |
885+
886+
---
887+
878888
### `spellCheck` <div className="label ios">iOS</div>
879889

880890
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
@@ -875,6 +875,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
875875

876876
---
877877

878+
### `smartInsertDelete` <div className="label ios">iOS</div>
879+
880+
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.
881+
882+
| Type | Default |
883+
| ---- | ------- |
884+
| bool | `true` |
885+
886+
---
887+
878888
### `spellCheck` <div className="label ios">iOS</div>
879889

880890
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
@@ -879,6 +879,16 @@ When `false`, it will prevent the soft keyboard from showing when the field is f
879879

880880
---
881881

882+
### `smartInsertDelete` <div className="label ios">iOS</div>
883+
884+
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.
885+
886+
| Type | Default |
887+
| ---- | ------- |
888+
| bool | `true` |
889+
890+
---
891+
882892
### `spellCheck` <div className="label ios">iOS</div>
883893

884894
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 className="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 className="label android">Android</div>
@@ -525,6 +533,26 @@ The following values work on Android only:
525533

526534
---
527535

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

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

880908
---
881909

910+
### `smartInsertDelete` <div className="label ios">iOS</div>
911+
912+
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.
913+
914+
| Type | Default |
915+
| ---- | ------- |
916+
| bool | `true` |
917+
918+
---
919+
882920
### `spellCheck` <div className="label ios">iOS</div>
883921

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

1063-
---
1064-
1065-
### `lineBreakModeIOS` <div className="label ios">iOS</div>
1066-
1067-
Set line break mode on iOS. Possible values are `wordWrapping`, `char`, `clip`, `head`, `middle` and `tail`.
1068-
1069-
| Type | Default |
1070-
| -------------------------------------------------------------------------- | ---------------- |
1071-
| enum(`'wordWrapping'`, `'char'`, `'clip'`, `'head'`, `'middle'`, `'tail'`) | `'wordWrapping'` |
1072-
1073-
---
1074-
1075-
### `lineBreakStrategyIOS` <div className="label ios">iOS</div>
1076-
1077-
Set line break strategy on iOS 14+. Possible values are `none`, `standard`, `hangul-word` and `push-out`.
1078-
1079-
| Type | Default |
1080-
| ----------------------------------------------------------- | -------- |
1081-
| enum(`'none'`, `'standard'`, `'hangul-word'`, `'push-out'`) | `'none'` |
1082-
1083-
---
1084-
1085-
### `disableKeyboardShortcuts` <div className="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-
10931101
## Methods
10941102

10951103
### `.focus()`

website/versioned_docs/version-0.81/textinput.md

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

880880
---
881881

882+
### `smartInsertDelete` <div class="label ios">iOS</div>
883+
884+
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.
885+
886+
| Type | Default |
887+
| ---- | ------- |
888+
| bool | `true` |
889+
890+
---
891+
882892
### `spellCheck` <div class="label ios">iOS</div>
883893

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

0 commit comments

Comments
 (0)