Skip to content

Commit

Permalink
fix: secureTextEntry issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoa Phan committed Jul 11, 2022
1 parent c3de44e commit a2ec4f9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-element-textinput",
"version": "2.0.0",
"version": "2.0.1",
"description": "A react-native TextInput, TagsInput and AutoComplete component easy to customize for both iOS and Android.",
"main": "lib/commonjs/index",
"module": "lib/module/index",
Expand Down
10 changes: 9 additions & 1 deletion src/HashtagInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/* eslint-disable no-shadow */
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { Image, StyleProp, Text, TextInput, TextStyle, TouchableOpacity, View } from 'react-native';
import {
Image,
StyleProp,
Text,
TextInput,
TextStyle,
TouchableOpacity,
View,
} from 'react-native';
import { styles } from './styles';
import type { HashtagProps } from './model';

Expand Down
9 changes: 8 additions & 1 deletion src/TagsInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
/* eslint-disable no-shadow */
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { StyleProp, Text, TextInput, TextStyle, TouchableOpacity, View } from 'react-native';
import {
StyleProp,
Text,
TextInput,
TextStyle,
TouchableOpacity,
View,
} from 'react-native';
import { styles } from './styles';
import type { TagsInputProps } from './model';

Expand Down
12 changes: 10 additions & 2 deletions src/TextInput/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
/* eslint-disable no-shadow */
import React, { useEffect, useMemo, useState } from 'react';
import { Image, StyleProp, Text, TextInput, TextStyle, TouchableOpacity, View } from 'react-native';
import {
Image,
StyleProp,
Text,
TextInput,
TextStyle,
TouchableOpacity,
View,
} from 'react-native';
import { styles } from './styles';
import type { InputProps } from './model';

Expand Down Expand Up @@ -178,9 +186,9 @@ const TextInputComponent: InputProps = (props) => {
<Text style={[styles.label, styleLable]}>{label}</Text>
) : null}
<TextInput
secureTextEntry={textEntry}
{...props}
style={[styles.input, inputStyle, font()]}
secureTextEntry={textEntry}
value={text}
placeholder={isFocus || !label ? placeholder : ''}
placeholderTextColor={placeholderTextColor}
Expand Down

0 comments on commit a2ec4f9

Please # to comment.