Skip to content

Commit

Permalink
Add spellCheck prop
Browse files Browse the repository at this point in the history
  • Loading branch information
iRoachie committed Jan 8, 2018
1 parent fa1f377 commit 4d1062b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/RNSearchBarManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ + (BOOL)requiresMainQueueSetup
RCT_EXPORT_VIEW_PROPERTY(keyboardAppearance, UIKeyboardAppearance)
RCT_REMAP_VIEW_PROPERTY(autoCapitalize, autocapitalizationType, UITextAutocapitalizationType)
RCT_REMAP_VIEW_PROPERTY(autoCorrect, autocorrectionType, UITextAutocorrectionType)
RCT_REMAP_VIEW_PROPERTY(spellCheck, spellCheckingType, UITextSpellCheckingType)
RCT_EXPORT_VIEW_PROPERTY(searchBarStyle, UISearchBarStyle)
RCT_CUSTOM_VIEW_PROPERTY(hideBackground, BOOL, RNSearchBar)
{
Expand Down
2 changes: 2 additions & 0 deletions src/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class SearchBar extends React.PureComponent {
keyboardAppearance: PropTypes.oneOf(['default', 'light', 'dark']),
autoCapitalize: PropTypes.oneOf(['none', 'words', 'sentences', 'characters']),
autoCorrect: PropTypes.bool,
spellCheck: PropTypes.bool,
barStyle: PropTypes.oneOf(['default', 'black']),
searchBarStyle: PropTypes.oneOf(['default', 'prominent', 'minimal']),
editable: PropTypes.bool,
Expand All @@ -64,6 +65,7 @@ class SearchBar extends React.PureComponent {
keyboardAppearance: 'default',
autoCapitalize: 'sentences',
autoCorrect: false,
spellCheck: false,
onChange: () => null,
onChangeText: () => null,
onFocus: () => null,
Expand Down
7 changes: 7 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ interface Props {
*/
autoCorrect?: boolean

/**
* If red underline is shown for misspelt words
*
* Default is false
*/
spellCheck?: boolean

/**
* Event fired when
*/
Expand Down

0 comments on commit 4d1062b

Please sign in to comment.