iOS: Introduce spellCheck prop to TextInput#11056
Closed
rigdern wants to merge 2 commits into
Closed
Conversation
Contributor
|
By analyzing the blame information on this pull request, we identified @janicduplessis and @javache to be potential reviewers. |
javache
reviewed
Nov 22, 2016
Contributor
There was a problem hiding this comment.
Should this be UITextSpellCheckingType instead of NSString?
javache
reviewed
Nov 22, 2016
Contributor
There was a problem hiding this comment.
Instead of repeating the logic here, extract this logic to an RCTConvert category.
Contributor
Author
|
I'm going to wait to see what happens with #11055 since this one will use the same pattern. |
added 2 commits
November 23, 2016 13:42
This exposes iOS's spellCheckingType functionality to JavaScript. The native functionality is a three state enum. It gets exposed to JavaScript as a boolean. The initial value and JS null map to the third state. An alternative design for this API would have been to expose a three state enum to JavaScript: - "on" which maps to UITextSpellCheckingTypeYes - "off" which maps to UITextSpellCheckingTypeNo - "auto" (default) which maps to UITextSpellCheckingTypeDefault For consistency, I decided to use the same API design as spellCheck. We don't have many options for fixing spellCheck in react#11055 without introducing a breaking change.
rigdern
force-pushed
the
rigdern/iosSpellCheck
branch
from
November 23, 2016 21:50
814c73e to
42d20a9
Compare
Contributor
Author
|
@javache I pushed a change to address your feedback and rebased my branch on master. |
Contributor
|
@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This exposes iOS's spellCheckingType functionality to JavaScript. The native functionality is a three state enum. It gets exposed to JavaScript as a boolean. The initial value and JS null map to the third state.
An alternative design for this API would have been to expose a three state enum to JavaScript:
For consistency, I decided to use the same API design as spellCheck. We don't have many options for fixing spellCheck in #11055 without introducing a breaking change.
Test plan (required)
Verified that switching
spellCheckbetweentrue,false, andnullall work correctly in single line and multilineTextInputs.