Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/layoutevent.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Component Y coordinate inside the parent component.

### `target`

The node id of the element receiving the PressEvent.
The node id of the element receiving the LayoutEvent.

| Type | Optional |
| --------------------------- | -------- |
Expand Down
29 changes: 29 additions & 0 deletions docs/targetevent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
id: targetevent
title: TargetEvent Object Type
---

`TargetEvent` object is returned in the callback as a result of focus change, for example `onFocus` or `onBlur` in the [TextInput](textinput) component.

## Example

```
{
target: 1127
}
```

## Keys and values

### `target`

The node id of the element receiving the TargetEvent.

| Type | Optional |
| --------------------------- | -------- |
| number, `null`, `undefined` | No |

## Used by

- [`TextInput`](textinput)
- [`TouchableWithoutFeedback`](touchablewithoutfeedback)
8 changes: 4 additions & 4 deletions docs/textinput.md
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,9 @@ Callback that is called when the text input is blurred.

> Note: If you are attempting to access the `text` value from `nativeEvent` keep in mind that the resulting value you get can be `undefined` which can cause unintended errors. If you are trying to find the last value of TextInput, you can use the [`onEndEditing`](textinput#onendediting) event, which is fired upon completion of editing.

| Type |
| -------- |
| function |
| Type |
| -------------------------------------------------------- |
| `md ({nativeEvent: [TargetEvent](targetevent)}) => void` |

---

Expand Down Expand Up @@ -639,7 +639,7 @@ Callback that is called when the text input is focused.

| Type |
| -------------------------------------------------------- |
| `md ({nativeEvent: [LayoutEvent](layoutevent)}) => void` |
| `md ({nativeEvent: [TargetEvent](targetevent)}) => void` |

---

Expand Down
12 changes: 6 additions & 6 deletions docs/touchablewithoutfeedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,19 +424,19 @@ Used to locate this view from native code. Has precedence over `nativeID` prop.

Invoked when the item loses focus.

| Type |
| -------- |
| function |
| Type |
| -------------------------------------------------------- |
| `md ({nativeEvent: [TargetEvent](targetevent)}) => void` |

---

### `onFocus`

Invoked when the item receives focus.

| Type |
| -------- |
| function |
| Type |
| -------------------------------------------------------- |
| `md ({nativeEvent: [TargetEvent](targetevent)}) => void` |

---

Expand Down