From 57626a8f8afa6f4b20767adc5282d2f522d0b2d1 Mon Sep 17 00:00:00 2001 From: Ralph Maamari Date: Mon, 5 Oct 2020 15:43:20 -0700 Subject: [PATCH 1/2] Update textinput.md This will make it more clear for beginners who are trying to use onBlur to do a final action on their textInput's text value. --- docs/textinput.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/textinput.md b/docs/textinput.md index e638925f21b..87a23b63ed4 100644 --- a/docs/textinput.md +++ b/docs/textinput.md @@ -432,6 +432,7 @@ Sets the number of lines for a `TextInput`. Use it with multiline set to `true` ### `onBlur` Callback that is called when the text input is blurred. +Note: If you are attempting to access the value `text` from `nativeEvent` keep in mind the resulting value you get is undefined which can cause unintended errors. If you are trying to find the last value of `text` from the `nativeEvent` upon completion of editing use `onEndEditing` instead. | Type | Required | | -------- | -------- | From 335edaa9ad27c8ff6488d9ce24524a03f475cee6 Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Wed, 7 Oct 2020 17:28:03 +0200 Subject: [PATCH 2/2] formatting, text tweaks --- docs/textinput.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/textinput.md b/docs/textinput.md index 87a23b63ed4..a9b890816a5 100644 --- a/docs/textinput.md +++ b/docs/textinput.md @@ -432,7 +432,8 @@ Sets the number of lines for a `TextInput`. Use it with multiline set to `true` ### `onBlur` Callback that is called when the text input is blurred. -Note: If you are attempting to access the value `text` from `nativeEvent` keep in mind the resulting value you get is undefined which can cause unintended errors. If you are trying to find the last value of `text` from the `nativeEvent` upon completion of editing use `onEndEditing` instead. + +> 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 | Required | | -------- | -------- |