Skip to content

Commit 83823e8

Browse files
cknittMoOx
authored andcommitted
Fix refs. (#382)
1 parent 129ed40 commit 83823e8

12 files changed

Lines changed: 41 additions & 36 deletions

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ type scrollToEndOptions;
190190
[@bs.obj]
191191
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
192192
"";
193-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
193+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
194194
[@bs.send]
195195
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
196196
"scrollToEnd";
@@ -227,7 +227,7 @@ external scrollToOffsetParams:
227227
[@bs.send]
228228
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
229229
230-
[@bs.send] external recordInteraction: ref => unit = "";
230+
[@bs.send] external recordInteraction: element => unit = "";
231231
232-
[@bs.send] external flashScrollIndicators: ref => unit = "";
232+
[@bs.send] external flashScrollIndicators: element => unit = "";
233233
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ type scrollToEndOptions;
183183
[@bs.obj]
184184
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
185185
"";
186-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
186+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
187187
[@bs.send]
188188
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
189189
"scrollToEnd";
@@ -220,6 +220,6 @@ external scrollToOffsetParams:
220220
[@bs.send]
221221
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
222222

223-
[@bs.send] external recordInteraction: ref => unit = "";
223+
[@bs.send] external recordInteraction: element => unit = "";
224224

225-
[@bs.send] external flashScrollIndicators: ref => unit = "";
225+
[@bs.send] external flashScrollIndicators: element => unit = "";

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,10 @@ type scrollToEndOptions;
150150
external scrollToEndOptions:
151151
(~animated: bool=?, ~duration: float=?, unit) => scrollToEndOptions =
152152
"";
153-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
153+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
154154
[@bs.send]
155155
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
156156
"scrollToEnd";
157157
158-
[@bs.send] external flashScrollIndicators: ref => unit = "";
158+
[@bs.send] external flashScrollIndicators: element => unit = "";
159159
```

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ type scrollToEndOptions;
143143
external scrollToEndOptions:
144144
(~animated: bool=?, ~duration: float=?, unit) => scrollToEndOptions =
145145
"";
146-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
146+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
147147
[@bs.send]
148148
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
149149
"scrollToEnd";
150150

151-
[@bs.send] external flashScrollIndicators: ref => unit = "";
151+
[@bs.send] external flashScrollIndicators: element => unit = "";

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ type scrollToEndOptions;
192192
[@bs.obj]
193193
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
194194
"";
195-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
195+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
196196
[@bs.send]
197197
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
198198
"scrollToEnd";
@@ -229,8 +229,8 @@ external scrollToOffsetParams:
229229
[@bs.send]
230230
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
231231
232-
[@bs.send] external recordInteraction: ref => unit = "";
232+
[@bs.send] external recordInteraction: element => unit = "";
233233
234-
[@bs.send] external flashScrollIndicators: ref => unit = "";
234+
[@bs.send] external flashScrollIndicators: element => unit = "";
235235
236236
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ type scrollToEndOptions;
185185
[@bs.obj]
186186
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
187187
"";
188-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
188+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
189189
[@bs.send]
190190
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
191191
"scrollToEnd";
@@ -222,6 +222,6 @@ external scrollToOffsetParams:
222222
[@bs.send]
223223
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
224224

225-
[@bs.send] external recordInteraction: ref => unit = "";
225+
[@bs.send] external recordInteraction: element => unit = "";
226226

227-
[@bs.send] external flashScrollIndicators: ref => unit = "";
227+
[@bs.send] external flashScrollIndicators: element => unit = "";

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ wip: true
55
---
66

77
```reason
8+
type element;
9+
type ref = React.Ref.t(Js.nullable(element));
10+
811
type event('a) = {. "nativeEvent": 'a};
912
1013
type editingEvent =
@@ -50,6 +53,8 @@ type keyPressEvent = event({. "key": string});
5053
[@react.component] [@bs.module "react-native"]
5154
external make:
5255
(
56+
~ref: ref=?,
57+
// TextInput props
5358
~allowFontScaling: bool=?,
5459
~autoCapitalize: [@bs.string] [
5560
| `characters
@@ -279,12 +284,12 @@ external make:
279284
React.element =
280285
"TextInput";
281286
282-
[@bs.send] external isFocused: ReasonReact.reactRef => bool = "";
287+
[@bs.send] external isFocused: element => bool = "";
283288
284-
[@bs.send] external clear: ReasonReact.reactRef => unit = "";
289+
[@bs.send] external clear: element => unit = "";
285290
286-
[@bs.send] external focus: ReasonReact.reactRef => unit = "";
291+
[@bs.send] external focus: element => unit = "";
287292
288-
[@bs.send] external blur: ReasonReact.reactRef => unit = "";
293+
[@bs.send] external blur: element => unit = "";
289294
290295
```

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,10 @@ external make:
277277
React.element =
278278
"TextInput";
279279

280-
[@bs.send] external isFocused: ref => bool = "";
280+
[@bs.send] external isFocused: element => bool = "";
281281

282-
[@bs.send] external clear: ref => unit = "";
282+
[@bs.send] external clear: element => unit = "";
283283

284-
[@bs.send] external focus: ref => unit = "";
284+
[@bs.send] external focus: element => unit = "";
285285

286-
[@bs.send] external blur: ref => unit = "";
286+
[@bs.send] external blur: element => unit = "";

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ type scrollToEndOptions;
243243
[@bs.obj]
244244
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
245245
"";
246-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
246+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
247247
[@bs.send]
248248
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
249249
"scrollToEnd";
@@ -280,7 +280,7 @@ external scrollToOffsetParams:
280280
[@bs.send]
281281
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
282282
283-
[@bs.send] external recordInteraction: ref => unit = "";
283+
[@bs.send] external recordInteraction: element => unit = "";
284284
285-
[@bs.send] external flashScrollIndicators: ref => unit = "";
285+
[@bs.send] external flashScrollIndicators: element => unit = "";
286286
```

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ type scrollToEndOptions;
236236
[@bs.obj]
237237
external scrollToEndOptions: (~animated: bool=?, unit) => scrollToEndOptions =
238238
"";
239-
[@bs.send] external scrollToEnd: ref => unit = "scrollToEnd";
239+
[@bs.send] external scrollToEnd: element => unit = "scrollToEnd";
240240
[@bs.send]
241241
external scrollToEndWithOptions: (ref, scrollToEndOptions) => unit =
242242
"scrollToEnd";
@@ -273,6 +273,6 @@ external scrollToOffsetParams:
273273
[@bs.send]
274274
external scrollToOffset: scrollToOffsetParams => unit = "scrollToOffset";
275275

276-
[@bs.send] external recordInteraction: ref => unit = "";
276+
[@bs.send] external recordInteraction: element => unit = "";
277277

278-
[@bs.send] external flashScrollIndicators: ref => unit = "";
278+
[@bs.send] external flashScrollIndicators: element => unit = "";

0 commit comments

Comments
 (0)