Skip to content

Commit

Permalink
blur fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng500 committed Oct 13, 2020
1 parent 2c10c17 commit 386355f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions example/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ const App = function App() {
const inputRef = useRef(null)
return (
<>
<TextArea ref={inputRef} value={text}/>
<TouchableOpacity
style={{ flex: 1, borderWidth: 1 }}
onPress={() => inputRef && inputRef.current && inputRef.current.blur()}
>
<Text>Others</Text>
</TouchableOpacity>
<TextArea ref={inputRef} value={text} containerStyle={{ height: 500 }}/>
</>
)
}
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,15 @@ const TextArea = forwardRef(({
style={[styles.style, containerStyle]}
onScrollBeginDrag={onScrollBeginDrag}
onScrollEndDrag={onScrollEndDrag}
keyboardShouldPersistTaps='handled'
>
<ScrollView
horizontal={true}
contentContainerStyle={styles.contentContainerStyle}
style={[styles.style, containerStyle]}
onScrollBeginDrag={onScrollBeginDrag}
onScrollEndDrag={onScrollEndDrag}
keyboardShouldPersistTaps='handled'
>
<View pointerEvents={isScrolling || isInitial ? 'box-only' : 'auto'} style={styles.style}>
<TextInput
Expand Down

0 comments on commit 386355f

Please sign in to comment.