Skip to content

Commit 8e1dfba

Browse files
fhammerschmidtcknitt
authored andcommitted
Fix #402 TextInput.dataDetectorTypes (#404)
1 parent 90bf370 commit 8e1dfba

6 files changed

Lines changed: 52 additions & 23 deletions

File tree

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
1+
'use strict';
2+
3+
4+
var DataDetectorTypes = 0;
5+
6+
exports.DataDetectorTypes = DataDetectorTypes;
7+
/* No side effect */

‎bs-react-native-next/src/components/TextInput.md‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ type selectionEvent = event(selection);
5050
5151
type keyPressEvent = event({. "key": string});
5252
53+
module DataDetectorTypes = TextInput_DataDetectorTypes;
54+
5355
[@react.component] [@bs.module "react-native"]
5456
external make:
5557
(
@@ -92,17 +94,7 @@ external make:
9294
=?,
9395
~clearTextOnFocus: bool=?,
9496
~contextMenuHidden: bool=?,
95-
~dataDetectorTypes: array(
96-
[
97-
| `phoneNumber
98-
| `link
99-
| `address
100-
| `calendarEvent
101-
| `none
102-
| `all
103-
],
104-
)
105-
=?,
97+
~dataDetectorTypes: array(DataDetectorTypes.t)=?,
10698
~defaultValue: string=?,
10799
~disableFullscreenUI: bool=?,
108100
~editable: bool=?,

‎bs-react-native-next/src/components/TextInput.re‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ type selectionEvent = event(selection);
4343

4444
type keyPressEvent = event({. "key": string});
4545

46+
module DataDetectorTypes = TextInput_DataDetectorTypes;
47+
4648
[@react.component] [@bs.module "react-native"]
4749
external make:
4850
(
@@ -85,17 +87,7 @@ external make:
8587
=?,
8688
~clearTextOnFocus: bool=?,
8789
~contextMenuHidden: bool=?,
88-
~dataDetectorTypes: array(
89-
[
90-
| `phoneNumber
91-
| `link
92-
| `address
93-
| `calendarEvent
94-
| `none
95-
| `all
96-
],
97-
)
98-
=?,
90+
~dataDetectorTypes: array(DataDetectorTypes.t)=?,
9991
~defaultValue: string=?,
10092
~disableFullscreenUI: bool=?,
10193
~editable: bool=?,
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* This output is empty. Its source's type definitions, externals and/or unused code got optimized away. */
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type t = string;
2+
3+
[@bs.inline]
4+
let phoneNumber = "phoneNumber";
5+
6+
[@bs.inline]
7+
let link = "link";
8+
9+
[@bs.inline]
10+
let address = "address";
11+
12+
[@bs.inline]
13+
let calendarEvent = "calendarEvent";
14+
15+
[@bs.inline]
16+
let none = "none";
17+
18+
[@bs.inline]
19+
let all = "all";
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
type t;
2+
3+
[@bs.inline "phoneNumber"]
4+
let phoneNumber: t;
5+
6+
[@bs.inline "link"]
7+
let link: t;
8+
9+
[@bs.inline "address"]
10+
let address: t;
11+
12+
[@bs.inline "calendarEvent"]
13+
let calendarEvent: t;
14+
15+
[@bs.inline "none"]
16+
let none: t;
17+
18+
[@bs.inline "all"]
19+
let all: t;

0 commit comments

Comments
 (0)